add pause and resume methods