preliminary ball collision detection added