Modify the path of ball.

The new code more difficult than original.