This case is before the court on petition for review and petition for cross-review of a decision of the court of appeals, State v. McQuay, 148 Wis. 2d 823, 436 N.W.2d 905 (Ct. App. 1989), which held that a plea agreement between the defendant, Dino Louis McQuay, and the state was contrary to public policy and, therefore, set aside the sentence imposed by the circuit court for Racine county, Emmanuel Vuvunas, Circuit Judge, pursuant to that agreement.'
The first issue presented for review is whether the plea agreement between the defendant and the state contravenes public policy. We hold that the agreement is not contrary to public policy. Although the plea agreement could have been better drafted, we read the agreement to provide that the defendant would enter no-contest pleas to five counts of first-degree sexual assault in exchange for the prosecutor's promise to move to dismiss all other counts filed against the defendant and to recommend to the sentencing court that it not consider the dismissed counts as an aggravating factor in imposing sentence. The prosecutor did not agree to withhold information concerning the defendant from the sentencing court and did not agree to limit information in the presentence report. We therefore reverse the decision of the court of appeals.
The second issue presented for review is whether the state breached the terms of the plea agreement in this case. The circuit court found that the state did not breach the agreement, and the court of appeals did not reach this issue. We hold that the state did not breach the plea agreement, and we affirm the order of the circuit *120court denying the defendant's motion for post-conviction relief.
The facts of this case follow. In January of 1987, the state issued five criminal complaints charging the defendant with twenty-nine counts of first-degree sexual assault involving ten children under the age of twelve. Separate preliminary hearings were held in each of the five cases, during which the ten victims testified. Based on the testimony at the preliminary hearings, the state issued five informations charging the defendant with twenty-nine counts of first-degree sexual assault.1
On February 18, 1987, Judge Vuvunas heard the defendant's pretrial motions which concerned, inter alia, severance of the twenty-nine counts for trial and the adequacy of the notice provided in the informations. The court postponed ruling on those motions. On March 17, 1987, the state moved to consolidate each of the five cases for trial. At a hearing on April 6, 1987, the court ruled that the twenty-nine counts would be consolidated for trial and that the informations provided the defendant sufficient notice to prepare his defense.
The state and the defendant, through his defense counsel, subsequently entered into a plea agreement which was reduced to writing. The agreement provided that the state would amend the original informations filed in the action to allege five counts of first-degree sexual assault and that the defendant would enter no-contest Alford2 pleas to each of those five counts. The *121remainder of the agreement provided, in relevant part, as follows:
All other counts originally filed . . . are dismissed outright, are not read in, and will not be considered for sentencing purposes.
At the time of sentencing, the State will recommend a sentence of twenty (20) years in the Wisconsin State Prison on count I of the amended information . . ..
On the remaining four counts, the State will recommend withheld sentences and a ten (10) year probation term on each count to run concurrently with each other but consecutively to the prison term. Conditions of probation to be recommended by the State are:
1) No contact with any of the children named as victims in any informations filed in these five cases.
2) Counseling.
(Emphasis in original.)
At a plea hearing on April 22, 1987, the defendant entered Alford pleas to five counts of first-degree sexual assault. Judge Vuvunas received a copy of the written plea agreement and reviewed its terms with the prosecutor and defense counsel. The court then questioned the defendant regarding his educational background and his emotional and psychological history. The court reviewed the elements of first-degree sexual assault with the defendant and advised him that he faced a maximum penalty of twenty years in prison on each count. The court then determined that the defendant understood the counts charged in the informations and that he had discussed possible defenses to those counts with his attorney. The court informed the defendant of the rights *122which he would waive by entering his pleas and made certain that the defendant understood that the court was not bound to follow the plea agreement. At the conclusion of the hearing, the court accepted the defendant's pleas to five counts of first-degree sexual assault, dismissed all other counts filed against the defendant, and ordered a presentence investigation report.
On July 6, 1987, the defendant objected to the presentence report on the ground that it contained detailed information regarding twenty-four counts of first-degree sexual assault which were dismissed by the court pursuant to the plea agreement. The defendant requested that the prejudicial information dealing with the dismissed counts be excised from the report. The court denied the request.
At the sentencing hearing on July 24, 1987, the prosecutor explained that the state had entered a plea agreement with the defendant to avoid a trial with all the children involved in the case. The prosecutor noted that the presentence report was extremely thorough and studious and that it contained information concerning a number of counts of first-degree sexual assault which were originally filed against the defendant and which had been dismissed outright pursuant to the terms of the plea agreement. The prosecutor stated that the state recommended a twenty-year term in prison on Count I of the amended information and withheld sentences and a ten-year term of probation on each of the remaining four counts to run concurrently with each other, but consecutively to the prison term. The prosecutor requested, as conditions of probation, that the defendant have no contact with the victims involved in the case and that he receive counseling.
Before sentencing the defendant, Judge Vuvunas stated that a number of counts of first-degree sexual *123assault had been dismissed pursuant to a plea agreement between the defendant and the state and that he would not consider those counts in sentencing the defendant. The court noted that the defendant should be incarcerated to protect the public from further criminal activity on his part and to ensure that he would receive proper correctional and rehabilitative treatment. The court further noted that a short period of incarceration would not adequately reflect the serious nature of the offenses committed by the defendant. The court sentenced the defendant to three consecutive ten-year sentences in prison on three of the counts in the amended information and to two concurrent twenty-year sentences on the remaining two counts, to run consecutively to the three ten-year sentences. The court stayed the twenty-year sentences in favor of probation and directed, as conditions of probation, that the defendant have no contact with children under the age of seventeen and that he receive counseling during his confinement.
The, defendant moved for post-conviction relief, claiming that the twenty-four counts of first-degree sexual assault which were dismissed pursuant to the terms of the plea agreement were not to be considered for sentencing purposes. The defendant argued that the state had breached the terms of the plea agreement when the preparer of the presentence report included a recitation of the dismissed counts in the report and when the prosecutor praised the thoroughness of that report during the sentencing hearing. The defendant requested preparation of a new presentence report, with all references to the dismissed counts excised, and resentencing before a different judge. The defendant requested, in the alternative, that he be allowed to withdraw his pleas. The circuit court found that the plea agreement had not been breached and denied the defendant's requested relief.
*124The defendant appealed from the judgment of conviction and the order denying his motion for post-conviction relief, repeating his argument that the state had breached the terms of the plea agreement. The court of appeals sua sponte raised and addressed the issue of whether the plea agreement in this case was contrary to public policy. The court of appeals held that the agreement was against public policy because it kept relevant information regarding the defendant's character and behavioral pattern from the sentencing court's consideration. McQuay, 148 Wis. 2d at 826-27. The court of appeals set aside the sentence imposed by the circuit court and remanded the case for resentencing, with directions that the court have access to all relevant information concerning the defendant at the time of resentencing. Id. at 827-28.
The state filed a petition for review and the defendant filed a petition for cross-review of the decision of the court of appeals, which we granted.
The first issue before this court is whether the plea agreement between the defendant and the state is contrary to public policy. The court of appeals cited Grant v. State, 73 Wis. 2d 441, 243 N.W.2d 186 (1976), for the proposition that agreements by prosecutors not to reveal relevant information to the sentencing court are against public policy and cannot be respected by the courts. The court of appeals observed that the plea agreement asked the court to disregard twenty-four counts of first-degree sexual assault in sentencing the defendant on the five counts to which he entered Alford pleas. The court of appeals concluded that the agreement was contrary to public policy because it kept relevant information from the court's consideration in sentencing the defendant. We disagree.
*125In Grant, the defendant pleaded guilty to three counts of burglary as part of a plea agreement with the state. Before sentencing, the district attorney and local police agencies asked the defendant to disclose his involvement in other crimes in order to clear police records and promised the defendant that the information he provided would not be used against him, read into the record at sentencing, or disclosed to the sentencing court. The presentence report included information acquired at the record-clearing conference concerning the defendant's involvement in a number of unsolved thefts and burglaries. At the sentencing hearing, the court stated that it could not ignore the pattern of criminal activity evidenced by the presentence report as an aggravating factor in sentencing and sentenced the defendant to three consecutive terms in prison of not more than ten years.
The defendant moved for post-conviction relief, claiming that the district attorney and local police agencies had breached the agreement not to disclose his involvement in the other crimes to the sentencing court. On review of the order denying the defendant's motion, this court held that the defendant had waived his right to claim a breach of the agreement because he chose not to object to the information included in the presentence report, but instead allowed the court to proceed with sentencing. Id. at 447-48. This court also deemed it essential to make a further comment. The court stated:
Agreements by law enforcement officials, whether they be by the police or prosecutors, not to reveal relevant and pertinent information to the trial judge charged with the duty of imposing an appropriate sentence upon one convicted of a criminal offense, are clearly against public policy and cannot be respected by the courts. Likewise, counsel repre*126senting defendants charged with crime are held to the same standard. They must advise the defendant that such agreements are illegal and will not be recognized by the court in the imposition of sentence.
Id. at 448.3
The rule set forth in Grant is intended to protect the integrity of the sentencing process by ensuring that the court charged with the duty of selecting an appropriate sentence for a convicted defendant is not intentionally deprived of relevant information concerning the defendant at the time of sentencing. This court has stated that the primary factors to consider in sentencing are the nature of the crime, the character of the defendant, and the rights of the public. Elias v. State, 93 Wis. 2d 278, 284, 286 N.W.2d 559 (1980). In determining the character of the defendant and the need for his incarceration and rehabilitation, the court must consider whether the crime is an isolated act or a pattern of conduct. Evidence of unproven offenses involving the defendant may be considered by the court for this purpose. Id.4
*127The plea agreement at issue in this case does not violate the rule of Grant because it was not an agreement to withhold or conceal relevant information concerning the defendant from the sentencing court. We read the plea agreement to provide that the defendant would enter no-contest pleas to five counts of first-degree sexual assault in exchange for the prosecutor's promise to move to dismiss all other counts filed against the defendant and to recommend to the sentencing court that it not consider the dismissed counts in imposing sentence. The prosecutor did not agree to withhold information concerning the dismissed counts from the sentencing court and did not agree to limit information in the presentence report.
Furthermore, no information concerning the defendant was actually withheld from the court at the time of sentencing. The sentencing court had access to information concerning all the counts originally filed against the defendant in the presentence report and in the court record in this case. The record included the complaints and informations initially issued against the defendant and the transcripts of the preliminary hearings at which all the victims testified. The court was, in addition, familiar with the factual basis underlying each of the dismissed counts, as it was required to review the record to decide the defendant's pretrial motions and to approve the dismissal of those counts pursuant to the plea agreement.
The court of appeals reasoned that the plea agreement kept relevant information concerning the defen*128dant from the sentencing court's consideration, and, therefore, contravened public policy. This reasoning assumes that the sentencing court was bound to follow the agreement and to ignore the dismissed counts in sentencing the defendant. It is well established, however, that the sentencing court is not in any way bound by or controlled by a plea agreement between the defendant and the state. See Young v. State, 49 Wis. 2d 361, 367, 182 N.W.2d 262 (1971). In fact, when a plea agreement contemplates charge or sentence concessions which must be approved by the court, the court must personally advise the defendant that the agreement is in no way binding on the court. State ex rel. White v. Gray, 57 Wis. 2d 17, 24, 203 N.W.2d 638 (1973). In the instant case, the following colloquy took place:
THE COURT: Do you understand, Mr. McQuay, that the Court is not bound by the plea negotiation? That this Court could sentence you to any sentence that the Court feels is appropriate sentence, and the Court could sentence you to up to any sentence up to the maximum for this offense, and the Court could make these sentences either concurrent, which means one sentence would run together with the other sentence, or consecutive, which means that one sentence would run after the other sentence had expired, so that the true maximum here is twenty years on each count or 100 years in the state prison; do you understand that?
THE DEFENDANT: Yes.
In light of the foregoing, we conclude that the plea agreement is not contrary to public policy because, as we read the plea agreement, the prosecutor did not agree to withhold information concerning the defendant from the sentencing court and did not agree to limit information *129in the presentence report. The provision in the agreement that the dismissed counts would not be considered for sentencing purposes was not binding on the sentencing court and was, therefore, nothing more than a promise on behalf of the prosecutor to recommend that the court not consider those counts as an aggravating factor in sentencing the defendant.5 The court had access to information concerning the dismissed counts and was, in fact, aware of those counts at the time of sentencing and chose, in its discretion, to abide by the plea agreement and to give no weight to the dismissed counts in sentencing the defendant. This court has stated that the weight to be attached to any particular factor in sentencing is within the wide discretion of the sentencing court. State v. Evers, 139 Wis. 2d 424, 452, 407 N.W.2d 256 (1987); Harris v. State, 75 Wis. 2d 513, 520, 250 N.W.2d 7 (1977). There is no contention that the court abused its discretion in this case.
The second issue before this court is whether the state breached the plea agreement in this case. The defendant argues that the probation officer who prepared the presentence report was a state agent and was bound to follow the plea agreement in preparing that report. He contends that the officer breached the agreement when she included a recitation of the dismissed counts in the presentence report even though the agreement expressly provided that those counts would not be considered by the court in sentencing the defendant. We *130conclude that the defendant's argument has little merit in light of this court's decision in Farrar v. State, 52 Wis. 2d 651, 191 N.W.2d 214 (1971).
In Farrar, the defendant pleaded guilty to a charge of burglary as part of a plea agreement in which the state was to recommend a prison sentence of not more than one year. The circuit court accepted the defendant's plea and ordered a presentence investigation report. After sentencing, the defendant moved for post-conviction relief, claiming that the preparer of the presentence report was a party to and bound by the plea agreement between the defendant and the state. The defendant contended that the preparer of the report had breached the plea agreement by recommending a prison sentence of two years. The circuit court denied the motion.
On review of the denial of the defendant's motion for post-conviction relief, this court emphasized that the entire sentencing process is to be a search for truth and an evaluation of alternatives and that the sentence to be imposed and the entire sentencing process must be insulated against pretrial bargains. Id. at 656-57. The court continued:
[I]t follows that the conducting of a presentence investigation and the recommendations of the court-appointed person conducting such investigation and evaluation are to be insulated against 'bargains' or predetermined conclusions.. . .
'. . . When a recommendation as to sentence is requested by the court, that court is entitled to an evaluation of all the factors and a recommendation based on all of the facts then in the record . . ..'
Id. at 656, quoting Young, 49 Wis. 2d at 369. The court concluded that the preparer of a presentence report, like *131the sentencing judge, cannot be a party to or bound by a plea agreement between the defendant and the state and affirmed the order denying the defendant's motion for post-conviction relief. Id. at 657-58.
This court's decision in Farrar establishes that the preparer of a presentence report is to be a neutral and independent participant in the sentencing process. It necessarily follows that a parole or probation officer acts on behalf of an independent judiciary, not as an agent of the state, in preparing a presentence report. Like the sentencing court, the preparer of a presentence report is neither a party to nor bound by a plea agreement between the defendant and the state and, therefore, cannot breach the terms of that agreement in preparing the report.
The defendant argues that the precedential value of Farrar is severely limited by the decision of the United States Supreme Court in Estelle v. Smith, 451 U.S. 454 (1981).6 The defendant contends that in Estelle, the Court held that persons who assist the court in making a sentencing determination may be considered agents of the state under certain circumstances. The defendant maintains that, after the decision of Estelle, a parole or probation officer may be considered an agent of the state who is bound to follow the terms of a plea agreement in *132preparing a presentence report for the benefit of the sentencing court. We disagree.
In Estelle, the trial court ordered a psychiatric examination of the defendant to determine his competency to stand trial for the capital offense of murder. The defendant was tried in a bifürcated trial and was found guilty. At the penalty stage of the trial, the state sought the imposition of the death penalty and had the burden to prove the defendant's future dangerousness. The state offered the testimony of the psychiatrist who had conducted the psychiatric examination to establish that the defendant would continue to commit similar criminal acts in the future.
The Supreme Court set aside the resulting death penalty and held, inter alia, that when the psychiatrist went beyond reporting to the court on the issue of competence and testified for the prosecution at the penalty phase of the trial, his neutral role changed and he became, in essence, an agent for the state. Id. at 467. The Court concluded that the compulsory psychiatric examination was accusatorial in nature and that the defendant should have been informed, pursuant to Miranda v. Arizona, 384 U.S. 436 (1966), that he had the constitutional right to remain silent during that examination. Id. at 467-69.
Estelle establishes that when a court-ordered examination of the defendant becomes accusatorial, a neutral actor for the court may be considered an agent of the state to the extent that the actor must afford the defendant constitutional protections during the examination. Estelle did not decide whether an accusatorial examination is sufficient to convert a neutral actor for the court to an agent of the state for all purposes, including that of binding the actor to the terms of a plea agreement between the defendant and the state in conducting the *133examination. Nor is that question at issue in this case because the presentence interview was not used to gather evidence against the defendant and, therefore, was not accusatorial in nature.7
We conclude that, in preparing the presentence report, the probation officer was acting on behalf of an independent judiciary and not as an agent of the state. Accordingly, we hold that the probation officer was neither a party to nor bound by the plea agreement between the defendant and the state and could not breach the terms of that agreement by including a recitation of the dismissed counts in the presentence report.
The defendant also argues that the prosecutor breached the terms of the plea agreement when she praised the presentence report as being extremely thorough and studious at the sentencing hearing. The plea agreement at issue in this case bound the prosecutor to recommend that the court impose a twenty-year prison sentence on Count I of the amended information and a ten-year sentence of probation on each of the four remaining counts, to run concurrently with each other but consecutively to the prison term. The plea agreement further bound the prosecutor to recommend that the sentencing court not consider the dismissed counts as an aggravating factor in sentencing the defendant. The plea *134agreement did not provide that the prosecutor could not comment on the factual thoroughness of the presentence report.
At the sentencing hearing, the prosecutor commented that the presentence report was extremely thorough and that it contained information concerning a number of counts which were originally filed against the defendant and which had been dismissed pursuant to the plea agreement. Although prosecutorial comment may, at times, be interpreted as designed to influence the sentence to be imposed, we conclude that that was not the case here. The prosecutor did not ask the court to consider any of the dismissed counts as an aggravating factor in sentencing the defendant and explicitly recommended that the court impose precisely the sentence for which the defendant had bargained on the five counts to which he entered pleas. We therefore conclude that the prosecutor did not breach the plea agreement at issue in this case.
By the Court. — The decision of the court of appeals is reversed; the judgment and order of the circuit court are affirmed.