added ability to stop the game and fixed bugs