addition to the collision detection