refactored pausing and api