adding pause functionality to classes