Added method for triggering events.