finish the main game flow framework