refactoring (MainGameState)