avoid having an inconsistent order of delta when moving a paper to another queue
group all deletion code into one foreach loop
remove dummy variable