working on the central thread for the game.