added functionality to pause the game