Use iterators instead of vectors for cloud input data