changed it.next() to next(it)