Some hacking about to see how best to handling global looping