Added getHostName() function