add callback to save()