player refactor