finished collision detection