added check for hostname