generic types for iterators