static boolean solvePuzzle (Cell[][] board, Cell[][] blocks, int x, int y, int index) {
		//create an array list to hold empty cells.
		ArrayList<Cell> emptyCells = new ArrayList<Cell>();
		
		//populate the emptyCell arraylist.
		for (x = 0; x < 9; x++) {
			for (y = 0; y < 9; y++) {
				if (board[x][y].getCellValue() == 0) {
					emptyCells.add(board[x][y]);
				}
			}
		}
		
		//Iterates through the emptyCell array list that was populated above.
		for (int i = 0; i < emptyCells.size(); i++) {
			    //if there are no possibleValues for that empty cell, we need to BACKTRACK.
			 	if (emptyCells.get(i).possibleValues.isEmpty()) {
					//increment index to try the next possibleValue of the previous cell.
					index = emptyCells.get(i - 1).getTestIndex() + 1;
					//Set the current and previous emptyCell's cellValue back to 0 and update the possibleValue
					//list for all emptyCells.
					emptyCells.get(i).setCellValue(0);
					emptyCells.get(i).setTestMarker(false);
					emptyCells.get(i - 1).setCellValue(0);
					emptyCells.get(i - 1).setTestMarker(false);
					//Subtract two from i so that once the for loop iterates i will point
					//to the previous empty cell.
					i = i - 2;
					narrowTheSearch (board, blocks);
				//else if all possible values have been tried for that emptyCell, we need to BACKTRACK
				} else if (index >= emptyCells.get(i).possibleValues.size()) {
					if (i != 0) {
						//set the index equal to the previous emptyCells index + 1 to try that cells next
						//possible value.
						index = emptyCells.get(i - 1).getTestIndex() + 1;
						//Set the current and previous emptyCell's cellValue back to 0 and update the possibleValue
						//list for all emptyCells.
						emptyCells.get(i).setCellValue(0);
						emptyCells.get(i).setTestMarker(false);
						emptyCells.get(i - 1).setCellValue(0);
						emptyCells.get(i - 1).setTestMarker(false);
						//Subtract two from i so that once the for loop iterates i will point to the previous
						//empty cell.
						i = i - 2;
						narrowTheSearch (board, blocks);
					} else
						//if the program attempts to access element -1, no solution is possible.
						return false;
				//else if the current emptyCell does have possibleValues to test.
				} else if (emptyCells.get(i).possibleValues.isEmpty() == false && index < emptyCells.get(i).possibleValues.size()) {
					//if testing, set the cellValue of the current emptyCell equal to the 
					//possibleValue at it's testIndex.
					emptyCells.get(i).setTestMarker(true);
					emptyCells.get(i).setTestIndex(index);
					emptyCells.get(i).setCellValue(emptyCells.get(i).possibleValues.get(emptyCells.get(i).getTestIndex()));
					narrowTheSearch (board, blocks);
					//reset the index for the next emptyCell
					index = 0;
				}
				
		}//end emptyCell for loop
				
		return true; //if the program got to this point the puzzle should be solved	
	}//end solvePuzzle