As long as you make it to the level finish, i would say that's a correct solution! That being said, you're right to be confused with the mechanics, since they aren't really explained properly in the game.