work for config refactor (nearly done)