made collisiondetection faster