change to use a generator function