private void sum (int type) {
        if (type >= 1 && type <= 4) a++;
        if (type >= 7 && type <= 14) b++;
        if (type >= 15 && type <= 18) c++;
        if (type == 0) d++;
        if (type == 5 || type == 6) e++;
        sumFields = a + b + c + d + e;
    }