Changed implementation to use Iterators, a perf hit is obvious