utils for gamestate