add callback on save