refactoring player_data