added generator example