change delete transaction algorithm