refactored CollisionDetector