updated coreApi and the event handler