updated CollisionDetection