re-implemented the ball controller