add callback to save method