Added support for pausing