removes gethostbyname call.