private ValidateNickResponse validateNick() throws IOException, PasswordException {
        if (config.isDebugOn())
            System.err.println("Requesting validation of username "+getUsername());
        //sending client's nick
        hubComm.sendDataToHub("$ValidateNick "+getUsername()+"|");

        String response = "";
        boolean nickIsRegistered = false;
        boolean isNickValid = false;

        try {
            response = hubComm.getHubData(30);
            if (config.isDebugOn())
                System.err.println("Hub responded with "+response);

            if (response.startsWith("$GetPass")) {
                //sending pass if neccessary
                //if hub requires password
                nickIsRegistered = true;
                String password = getPassword();
                if (password.isEmpty()) {
                    throw new exceptions.PasswordException("Password not provided, however, it is required by hub.");
                } else {
                    hubComm.sendDataToHub("$MyPass "+password+"|");
                    response = hubComm.getHubData(30);
                    if (response.startsWith("$BadPass")) {
                        isNickValid = false;
                        nickIsRegistered = true;
                    }
                }
            }
            if (response.startsWith("$Hello")) {
                isNickValid = true;
            } else {
                nickIsRegistered = false;
                isNickValid = false;
            }
        } catch (TimeoutException e) {
            if (config.isDebugOn()) {
                System.err.println("Hub did not respond to validate nick request" );
            }
            nickIsRegistered = false;
            isNickValid = true; //TODO this is tmp
        }

        return new ValidateNickResponse(isNickValid, nickIsRegistered, response);
    }