refactored host class