onResume and onDestroy methods added