Collision detection implemented