now checkHostname function is not glabal variable