player-functions and logic