Added getHostName method