## TODO: avoid code repetition on the events side, context should be handled appart