added functionally to player class along with passing tests