rewritten to use event-kit