Added pause and resume