extracted client-related code to whois-client