added afterDelete hook