player control refactoring