simplify hostname extraction even if it is expensive now