renamed and added some stages to the game loop