pausing functionality finished