Added getHostsByHostname function.