getting pause()  resume() to work