Add pause/continue function