Added pause/unpause functions.