int resetPassword(int cardID, String password, String newPassword) {
        int errorNumber = 0;
        if (hasMember(cardID)) {
            if (isPasswordRight(cardID, password)) {
                if (checkPassword(newPassword) == 0) {
                    for (Member a : userList) {
                        int index;
                        if (a.cardID == cardID) {
                            index = userList.indexOf(a);
                            userList.get(index).password = newPassword;
                            break;
                        }
                    }
                } else errorNumber = checkPassword(newPassword);
            } else errorNumber = 2; // 2 is password not right
        } else errorNumber = 1; //1 is no user
        return errorNumber; //0 is no problem
    }