refactoring for nconf