config as factory