make pause/resume button work