Adding functions to player class