refactor config_for_spec