implement pausing