refactor config load