fixed the player class constructor