refactor to PauseActivity.