added code to show events.