add pause/resume behavior