added onResume event