Added functionality for more events.