Added code for ball, not tested