refactor player movement