start of collision detection