refactored movement