refactor load_config()