Example with random events.