added comments for event code