added Generator class