host refactoring