made the ball bounce from the top and bottom
modified collision detection