pause functionality implemented