public void extendTreeHeight() {
        //build the alloweChars array
        String[] allowedChars = new String[Oracle.allowedChars.length - globalPrefix.length()];
        int index = 0;
        for (String e : Oracle.allowedChars) {
            if (!globalPrefix.contains(e)) {
                allowedChars[index++] = e;
            }
        }
        //get all combinations for the remaining char set
        ArrayList<String> allCombinations = (new CombinationGenerator()).GetAllCombinationsUptoN(allowedChars, maxCombLen);

        //generate suffixes, check for tree balance, and expand
        //ArrayList<Prefix> nextPrefixes = new ArrayList<Prefix>();
        String selectedCombination = "";
        int minScore = Integer.MAX_VALUE;
        for (String com : allCombinations) {
            //Prefix[] prefixes = new Prefix[((int) Math.pow(2, com.length()))];
            int max = Integer.MIN_VALUE, avg = 0, b = 0;
            ArrayList<Prefix> allPrefix = GetPrefixes(globalPrefix + com);
            int[] prefixMatches = new int[allPrefix.size()];
            for (; b < allPrefix.size(); b++) {
                //calculate count
                prefixMatches[b] = 0;
                //create a new prefix
                Prefix prefix = new Prefix();
                prefix.add(allPrefix.get(b));
                //add global prefix and current prefix to prefix
                for (String name : allNames) {
                    if (prefix.isMatch(name)) {
                        prefixMatches[b]++;
                    }
                }
                if (prefixMatches[b] > max) {
                    max = prefixMatches[b];
                }
                avg += prefixMatches[b];
            }
            avg /= b;
            //calculate score
            if (minScore > (max - avg)) {
                minScore = max - avg;
                selectedCombination = com;
            }
        }
        //System.out.println(selectedCombination);

        H2C.add(currentHeight++, selectedCombination);
        globalPrefix += selectedCombination;

        //expand the tree
        //generate the prefixes and create the leaf nodes
//        for (int b = 0; b < Math.pow(2, selectedCombination.length()); b++) {
//            // check for bits
//            int c = (1 << (selectedCombination.length() - 1));
//            Prefix prefix = new Prefix();
//            //prefix.add(node.prefix); // VERY IMPORTANT STEP
//            for (int l = 0; l < selectedCombination.length(); l++) {
//                if ((b & c) == 0) {
//                    prefix.addLetter(selectedCombination.charAt(l), '-');
//                } else {
//                    prefix.addLetter(selectedCombination.charAt(l), '+');
//                }
//                c = (c >> 1);
//            }
//            //prefix is ready, now create node and add names
//            TreeNode lf = new TreeNode();
//            lf.parent = node;
//            lf.prefix = prefix;
//            node.addChild(lf);
//            for (String name : node.names) {
//                if (prefix.isMatch(name)) {
//                    lf.addName(name);
//                }
//            }
//        }
//        node.names.clear(); // very important
    }