refactored position movement