small refactore for config_init