adding onResume event