player controller refactor