loop, this queue manipulation is dead wrong as Queue is not a synchronized data structure. Hopefully this helps.