add callback for metadata update