ball update function change
ball update function