fix naming issue, remove use of Iterator, DRY