adding onPause methods for activities