add pausing functionality