support pause, resume and cancel