corrected config_gen