Event related code updated