refactor config framework