refactoring: events are now represented as dicts
refactoring: events are now represented as dicts