adding pause functionality #20