Event process code