added functionality to player class