dropped generate_iter(), made generate() into an iterator