Generator class