modified WordIterator to use Source.stdin instead