@Override
    public void run() {
        try {

            System.out.println(x);
            System.out.println(y);
            //zero out the first row
            //set some message

            calculationsArea.setText(
                    "<html><div style=\"font-size: 15pt; text-align: center\">"
                    + "First we zero out the first row and column."
                    + "</div></html>");
            Thread.sleep(textTime);

            //zero out the first row
            for (int i = 0; i <= m; i++) {
                setAt(new Integer(0), 0, i);
                core[i][0] = new Integer(0);
                setCell(redCell, 0, i);
                coreTable.repaint();
                Thread.sleep(actionTime);
            }

            //zero out the first column
            for (int j = 0; j <= n; j++) {
                core[0][j] = new Integer(0);
                setAt(new Integer(0), j, 0);
                setCell(redCell, j, 0);
                coreTable.repaint();
                Thread.sleep(actionTime);
            }

            resetCellColors();

            //for all characters in m
            for (int i = 1; i <= m; i++) {
                //for all characters in n
                for (int j = 1; j <= n; j++) {
                    
                    resetCellColors();

                    setCell(cyanCell, j, 1);
                    setCell(greenCell, 1, i);
                    setCell(redCell, j, i);

                    calculationsArea.setText(
                            "<html><div style=\"font-size: 20pt; text-align: center\">"
                            + "We check to see if "
                            + "<span style=\"background-color: #00ff00\">" + index(x, i) + "</span>" + //green
                            " matches <span style=\"background-color: #00ffff\">" + index(y, j) + "</span>"
                            + "</div></html>");

                    Thread.sleep(textTime);

                    //if the 2 characters match
                    if (index(x, i) == index(y, j)) {

                        setCell(yellowCell, i - 1, j - 1);
                        core[i][j] = new Integer(core[i - 1][j - 1].intValue() + 1);
                        setAt(new Integer(valueAt(j - 1, i - 1) + 1), j, i);
                        b[i][j] = UP_AND_LEFT;
                        
                        calculationsArea.setText(
                                "<html><div style=\"font-size: 20pt; text-align: center\">"
                                + "They DO match!<br />So we get the current match total " +
                                "<span style=\"background-color: #fff000\">" + valueAt(j - 1, i - 1) + "</span>" + //yellow
                                " and add <strong>1</strong> bringing our match total to <span style=\"background-color: #ff0000\">" + ((valueAt(j - 1, i - 1)) + 1) + "</span>" + //red
                                "</div></html>");

                        Thread.sleep(textTime);


                    } //if the 2 characters don't match
                    else {
                        //Check to see if a higher match has been made already
                        //If so assign that higher match to this cell and label it up
                        calculationsArea.setText(
                                "<html><div style=\"font-size: 20pt; text-align: center\">" + 
                                "They DON'T match!<br />So we check to see if a higher match has been made already." +
                                "</div></html>");
                        
                        Thread.sleep(textTime);
                        
                        if (valueAt(j, i - 1) >= valueAt(j - 1, i)) {
                            
                            calculationsArea.setText(
                                "<html><div style=\"font-size: 20pt; text-align: center\">"
                                + "This value "
                                + "<span style=\"background-color: #fff000\">" + valueAt(j, i - 1) + "</span>" + //yellow
                                " is <strong>&#8805;</strong> <span style=\"background-color: #ff0000\">" + (valueAt(j - 1, i)) + "</span>" + //red
                                "</div></html>");

                            setCell(yellowCell, j, i - 1);
                            core[i][j] = core[i - 1][j];
                            setAt(valueAt(j, i - 1), j, i);
                            b[i][j] = UP;
                            
                            Thread.sleep(textTime);
                            
                        } //Else the previous match is less than the current match
                        //assign the value from the left and assign label left
                        else {
                            
                            calculationsArea.setText(
                                "<html><div style=\"font-size: 20pt; text-align: center\">"
                                + "This value "
                                + "<span style=\"background-color: #fff000\">" + valueAt(j, i - 1) + "</span>" + //yellow
                                " is <strong>&#60;</strong> <span style=\"background-color: #ff0000\">" + (valueAt(j - 1, i)) + "</span>" + //red
                                "</div></html>");

                            setCell(yellowCell, j - 1, i);
                            setAt(valueAt(j - 1, i), j, i);
                            core[i][j] = core[i][j - 1];
                            b[i][j] = LEFT;
                            
                            Thread.sleep(textTime);
                        }
                    }
                }
            }
            
            calculationsArea.setText(
                "<html><div style=\"font-size: 20pt; text-align: center\">"+ 
                "The final substring of:<br /> " + x + ", " + y + 
                "<br />= " + toString() +
                "</div></html>");
            resetCellColors();
            System.out.println(toString());

        } catch (InterruptedException ex) {
            System.out.println("Interrupted");
        }
    }