refactor config sync