adding collision detection server side