rewrote game loop, also broke the game.