generator's definition fixed, some intentation fixes