Added pause/resume functionality to buttons