expose onUpdate callback