copied from EventManager and Agenda