config provider refactor