added the onPause()