Added pausing functionality