Add pausing functionality.