correct logic in hosts