trigger now supports multiple events, bug fixes