reading with iterator. can improve long file parsing