private void searchSolution(int row, int col, Piece piece, Boolean success) {
        if (isPlacable(row, col, piece)) {
            put(row, col, piece);
            if (done(row, col)) {
                if (alreadyPlaced == pieces.size()) {
                    if (isNewSolution(solutionBoard)) {
                        addSolution();
                        if (solutions.size() % 1000 == 0){
                            System.out.println("Solutions found so far.. " + solutions.size());
                        }
                    }
                } else {
                    success = true;
                }
                remove(row, col, piece);
            } else {
                for (int i = 0; i < n; i++) {
                    for (int j = 0; j < n; j++){
                        if (alreadyPlaced < pieces.size()) {
                            searchSolution(i, j, pieces.get(alreadyPlaced), success);
                        }
                    }
                }
                if (!success) {
                    remove(row, col, piece);
                }
            }
        }
    }