refactor config module