refactoring movement behaviour