added json for events, still todo -> fix quirky events that race