add an example for on_pause()