updated the methods to pause and resume games