Refactored ip into host