FIX: use next(iterator) built-in instead of iterator.next()