added afterdelete callback