Get rid of the generator function