added support for multiple events with the same name