public void doStep() {
        W1 = nonRemainderSet(keys, "W1^0");
        W2 = nonRemainderSet(notKeys, "W2^0");
        ArrayList<String> splitz = new ArrayList<>();
        splitz.addAll(W1);
        splitz.retainAll(W2);
        ArrayList<String[]> toAdd = new ArrayList<>();
        
        //If has extra elements, do the painful removal procedure
        if (splitz.size() > 0) {
            w.printText("Remainder: " + splitz + "\n");

            for (int i = 0; i < splitz.size(); i++) {
                int listCounter = 0;
                for (ArrayList<String> list : notKeys) {
                    String currentKey = splitz.get(i);
                    if (list.contains(currentKey)) {
                        String[] adder = removeExtraElement(listCounter, currentKey);
                        w.printText("B" + (listCounter + 1) + "** (column " + currentKey
                                + " removed):\n" + bStarMatrix.get(listCounter) + "\n");
                        toAdd.add(adder);
                    }
                    listCounter++;
                }
            }
        }
        //Form the global matrix
        W0 = new ArrayList<>();
        W0.addAll(W1);
        W2.removeAll(splitz);
        W0.addAll(W2);
        int[][] data = new int[W1.size()][W0.size()];

        for (Matrix current : bStarMatrix) {
            for (int i = 0; i < W1.size(); i++) {
                for (int j = 0; j < W0.size(); j++) {
                    if (current.isConnected(W1.get(i), W0.get(j))) {
                        data[i][j] = 1;
                    }
                }
            }
        }

        global = new Matrix(W0.toArray(new String[0]), data);
        //add toRemove from the final matrix
        for (String[] adder : toAdd) {
            global.setValue(adder[0], adder[1], 1);
            w.printText("Added a link between keys " + adder[0] + " and " + adder[1] + "\n");
        }
        w.printText("\nCombined matrix B0:\n" + global);
        w.addToMatrixBox("B0", global);
    }