adding validation check for hostname