refactored to support new config model