implement gamestate