simplify generator example