add update API function, try to add callback to finalize