added in pause and continue functions, so that the game can be paused when user presses 'p'