private DetectListTuple detectLists(Matrix<MatchTuple> wMatrix, Tree<String> a, Tree<String> b) throws MatrixException {
        int m = wMatrix.getRowSize();
        int n = wMatrix.getColSize();
        Matrix<Double> normWMatrix = new Matrix<Double>(m, n);
        //compute normalized match value
        for (int i = 1; i <= m; i++) {
            for (int j = 1; j <= n; j++) {
                MatchTuple matchTuple = wMatrix.getElement(n, j);
                normWMatrix.setElement(i, j, (double)matchTuple.score()/(Math.max(matchTuple.nodesA(), matchTuple.nodesB())));
            }
        }       
        double maxAi = 0, maxBj = 0;
        double t1 = 50.0, t2 = 70.0;
        
        List<String> stringA = new ArrayList<String>();
        List<String> stringB = new ArrayList<String>();
        
        for (int i = 1; i <= m; i++) {
            maxAi =   Collections.max(normWMatrix.getRow(i-1)); 
            for (int j = 1; j <= n; j++) {
                double normScore = normWMatrix.getElement(i, j);
                maxBj = Collections.max(normWMatrix.getColumn(j-1));
                if (normScore > t1 && (normScore/maxAi > t2) && (normScore/maxBj > t2)) {//#10
                    /*Sub tree Sai and Sbj matches*/
                    //TODO: See if symbol table is required?? Required
                    //#14
                    Tree<String> sai = a.getSubTreeByPreOrder(i);
                    stringA.add(a.getRoot().getChildAt(i-1).getLabel());

                    Tree<String> sbi = b.getSubTreeByPreOrder(j);
                    stringB.add(b.getRoot().getChildAt(i-1).getLabel());
                } else {
                    stringA.add(a.getRoot().getChildAt(i-1).getLabel());
                    stringB.add(b.getRoot().getChildAt(i-1).getLabel());
                }
            }
        }
        String gA = grammarGeneration(stringA);
        String gB = grammarGeneration(stringB);
        if (matchGrammerString(gA, gB)) {
            return updateW(wMatrix, gA, gB);
        } else {
            return new DetectListTuple(wMatrix, a.size(), b.size());
        }
        
        
    }