Adding pause/resume func.