refactor host method.