Add pause and resume functionality (in progress)