add pause/resume functionnality