working on player functions