moved controller logic into player_controller