moves when out of range until in range