refactored collisionType