made an update method in the pong class