hostname resolve section refactoring