little refactoring of player class