added some code to create game objects, which will control the gamestate begining and end functionality