events are now passed in as a map