Better way of getting the hostname