added new collision code for ball