Added non sucky implementation of CachingIterator