now it is onPause and onResume