moves inserting the game out of the loop, preventing a crash