more explanation of the collision detection