finished rework of config.c