public void solve (String[] args) {
        String str = this.getInput(args);
        this.buildPuzzle(str, args);
        for (int i = 1; i < 10; i++) {
            Box b = new Box(i);
            this.boxes.add(b);
        }
        ArrayList<EmptyCell> EmptyCells = new ArrayList<EmptyCell> ();
        this.buildEmptyCells(EmptyCells);
        for (int i = 0; i < EmptyCells.size(); i++) {
            EmptyCells.get(i).getRowNums(this.getSize(), this.getMatrix());
            EmptyCells.get(i).getColNums(this.getSize(), this.getMatrix());
            EmptyCells.get(i).getBoxNums(this.getSize(), this.getMatrix());
            EmptyCells.get(i).availCell(this.getSize());
            int box = EmptyCells.get(i).determineBox();
            this.boxes.get(box-1).cells.add(EmptyCells.get(i));
        }
        // build an arrayList of possible solutions for each box
        int count = 0;
        for (Box b : this.boxes) {
            count++;
            if (b.cells.size() > 0) {
                for (int i : b.cells.get(0).getBoxAvail()) {
                    b.initialValues.add(i);
                }
            }
        }
        // populate the cells in each box with different random values
        count = 0;
        for (Box b : this.boxes) {
            count++;
            Collections.shuffle(b.initialValues);
            for (int i = 0; i < b.cells.size(); i++) {
                this.getMatrix()[b.cells.get(i).coord[0]][b.cells.get(i).coord[1]] = b.initialValues.get(i);
            }
        }
        // print matrix after initial population to ensure no duplicate values inserted
        System.out.println("!!!\nMatrix after non-duplicate population!!!");
        this.printMatrix();
        
//      this method controls the solving of the puzzle        
        if (EmptyCells.isEmpty()) {
            this.isSolved = true;
        }
        else {
            beginSolving();
        }
        
        if (this.getSolved()) {
            System.out.println("\n************\nSuccess!!!\n");
            this.printMatrix();
        }
        else {
            System.out.println("\nNOT SOLVED!!!");
        }  
        
    }