make the generator example more readable