- cleaned code of generator_t class