Added support for pause and resume reworked logic