if the hostmap is for caching in this function only use ```_hostmap```