added a transition to move the ball in an animated way