add support for adding events, also add removeEvent to API (not yet implemented in ui)