Checking movement, 4th part, can reverse movement in the border cases