better generator.h