Coding the Ball update method