removed strange way to write foreach loops, was that pseudo-code?