Switched another method to use a for-each loop instead of an iterator.