public static Puzzle colorPuzzle(Puzzle sudoku){
		if(sudoku.solved()) return sudoku;

		//make a copy of the puzzle's sorted cliques
		ArrayList<Clique> orderedCliques = new ArrayList<Clique>();
		orderedCliques.addAll(sudoku.getOrderedCliques(sudoku.getCliques()));
		
		//start with the most colored clique, resorting after each is completed		
		while(!orderedCliques.isEmpty()){
			Clique clique = orderedCliques.remove(0);
			for(Cell cell : clique.getUncoloredCells()){
				//if there are no valid colors for a cell, we've hit an invalid arrangement
                if(cell.getValidColors().size() == 0) return null;
				    
                //pull out the colors, as Java doesn't like changing data
				ArrayList<Character> colors = cell.getValidColors();
				for(int i = 0; i < colors.size(); i++){
					cell.color(colors.get(i));
		            //System.out.println("\n" + sudoku.toString());
					Puzzle solution = colorPuzzle(sudoku);
					if(solution != null && solution.solved()) return solution;
					cell.uncolor();
				}				
			}
		}
		//reached the end, no solution found
		return null;
	}