Added a generic iterator.