Add on_pause method