collisionhandler refactored