refactor load_config