added support for Pause and Resume