right and left collision detection works