cleanup solution
re-implement Stream.toSeq in terms of IEnumerator