adding functions to player class