changing the config to a factory