Added pause / resume functionality