Added pause and resume methods.