Refactor reader with arrayIterator