updated api for UI events.