Updated examples with events.