
239 P.3d 456 (2010)
STATE of Idaho, Plaintiff-Respondent,
v.
Jeffery A. BALL, Defendant-Appellant.
No. 35627.
Court of Appeals of Idaho.
September 1, 2010.
*457 Molly J. Huskey, State Appellate Public Defender; Heather M. Carlson, Deputy Appellate Public Defender, Boise, for appellant.
Hon. Lawrence G. Wasden, Attorney General; Kenneth K. Jorgensen, Deputy Attorney General, Boise, for respondent.
GRATTON, Judge.
Jeffery A. Ball appeals from his judgment of conviction and sentence entered upon his guilty plea to the charge of rape, Idaho Code § 18-6101. We affirm.


*458 I.

FACTS AND PROCEDURAL BACKGROUND
On March 13, 2008, Ball, who was forty-three years old at the time, was charged by information with raping S.A.T., a sixteen-year-old female. Ball was arraigned on April 14, 2008, and his attorney indicated that Ball and the State had entered into a plea agreement. Pursuant to an Idaho Criminal Rule 11(f) binding plea agreement, Ball agreed to plead guilty, and the State agreed to dismiss another case against Ball for possession of a firearm. The parties agreed to a maximum ten-year sentence, leaving to the district court's discretion the determinate portion of the sentence. Additionally, Ball agreed to waive his Fifth Amendment rights and participate in a psychosexual evaluation and polygraph, and the State agreed not to charge Ball with any matters arising from those evaluations. The State further agreed not to file additional charges with respect to any evidence obtained pursuant to the search warrant. The court inquired as to whether the agreement would be reduced to writing, and defense counsel indicated that she would submit the proposed Rule 11 plea agreement prior to sentencing.[1] Thereafter, the court summarized the terms of the agreement presented by defense counsel, discussed some of the terms with counsel and Ball, engaged Ball in a plea colloquy, and ultimately accepted Ball's guilty plea.
At the outset of the sentencing hearing, the district court informed Ball that it had reviewed the plea agreement, the presentence report, and several other documents, including the psychosexual evaluation and "related documents." The court indicated that it was not prepared to "go along" with the plea agreement, and rejected it. The court then inquired of Ball as to whether he wished to proceed with sentencing or withdraw his guilty plea. Ball ultimately chose to go forward with the sentencing, and the court sentenced him to a unified term of twenty years, with seven years determinate. Ball appeals, primarily challenging the district court's decision not to accept and be bound by the plea agreement.

II.

ANALYSIS

A. Plea Agreement
Ball claims that the district court abused its discretion by refusing to be bound by the Rule 11 plea agreement at sentencing. Specifically, Ball contends that he was required by the plea agreement to waive his Fifth Amendment rights and submit to the psychosexual evaluation and polygraph evaluation ("the evaluations"). The evaluations were presented to the district court prior to its refusal to be bound by the plea agreement. Under that circumstance, he argues that the district court should not be allowed to refuse to be bound by the plea agreement because the court would retain the benefit of the evaluations, obtained under the plea agreement, yet reject the plea agreement. Ball asserts that simply allowing withdrawal of the guilty plea, at that point, is an inadequate remedy. He concludes that either the district court must be bound by the plea agreement or, at a minimum, allow the evaluations to be withdrawn and the case reassigned to a different judge for sentencing. Ball also claims that in accepting his guilty plea, the court bound itself to the plea agreement as it did not specifically state that it was deferring its decision until it had an opportunity to review the evaluations.
Ball does not provide any direct authority for the position which he urges this Court to adopt. He does not claim a violation of his *459 Fifth Amendment privilege against self-incrimination. Nor does he assert that the district court violated I.C.R. 11. In fact, Ball acknowledges that the court complied with I.C.R. 11(f)(4) when it rejected the plea agreement by affording him the opportunity to withdraw his guilty plea, although he chose not to avail himself of that opportunity. At bottom, Ball argues that because he participated in the evaluations as part of the plea agreement, the court was required to accept the agreement as the opportunity to withdraw his plea was not a "sufficient remedy."
Idaho Criminal Rule 11(f) sets forth the procedure to be applied in the context of plea agreements. Idaho Criminal Rule 11(f)(1) provides, in relevant part:
The prosecuting attorney and the attorney for the defendant or the defendant ... may engage in discussions with a view toward reaching an agreement, which may include ... that upon the entering of a plea of guilty to a charged offense ... the prosecuting attorney will do any of the following:
(A) move for dismissal of other charges; or
(B) make a recommendation, or agree not to oppose the defendant's request, for a particular sentence, with the understanding that such recommendation or request shall not be binding upon the court; or
(C) agree that a specific sentence is the appropriate disposition of the case; or
(D) agree to any other disposition of the case.
The court may participate in any such discussions.
If the agreement falls under I.C.R. 11(f)(1)(A), (C), or (D), the court may accept or reject the agreement, or defer its decision as to acceptance or rejection until there has been an opportunity to consider the presentence report. I.C.R. 11(f)(2). If the agreement falls under I.C.R. 11(f)(1)(B), the court shall advise the defendant that if the court does not accept the recommendation or request, the defendant nevertheless has no right to withdraw his plea. I.C.R. 11(f)(2).
The terms of the plea agreement articulated at Ball's arraignment arguably fall under each of the circumstances set forth in I.C.R. 11(f)(1). As such, when at least some of the terms come within I.C.R. 11(f)(1)(A), (C), and/or (D), a court is free to accept or reject the agreement or defer its decision as to acceptance or rejection until it could consider the presentence report. See I.C.R. 11(f)(2). With respect to the decision of whether or not to accept or reject the plea agreement, I.C.R. 11(f)(3) provides that if the court accepts the plea agreement, it shall inform the defendant that it will implement the disposition provided for in the plea agreement. Idaho Criminal Rule 11(f)(4) provides that if the court rejects the plea agreement, it shall advise the defendant personally, in open court, that the court is not bound by the plea agreement and afford the defendant the opportunity to withdraw the defendant's plea. The court here complied with the requirements of I.C.R. 11(f)(4) when it afforded Ball the opportunity to withdraw his guilty plea after rejecting the plea agreement. Ball's failure to avail himself of that opportunity because he now asserts that it was not a "sufficient remedy" does not transform the court's compliance with the rule into error.
Ball also contends that nothing in I.C.R. 11(f)(2) allows for the district court to wait until sentencing, as the court did in this case, to determine whether or not to accept a plea agreement. He argues that by accepting his guilty plea, the district court bound itself to the plea agreement. This contention is belied by the record.
At the arraignment, the district court engaged Ball in a plea colloquy, specifically informing and inquiring about the plea agreement:
[THE COURT]: You have a Rule 11 agreement here. What that means is, at the time of sentencing, I will let you know if I accept this agreement. And if I do, then that is the sentence you'll receive is the sentence contemplated by this agreement. If I reject the agreement, then you're free to reenter a plea of not guilty to both cases and to proceed to trial. Do you understand that?

*460 THE DEFENDANT: Yes, sir, Your Honor.
THE COURT: If, at the time of sentencing, I inform you that Ithat I am accepting the Rule 11 plea agreement, then you'll not be allowed to withdraw your guilty plea. Do you understand that?
THE DEFENDANT: Yes, Your Honor.
(Emphasis added.) The court clearly did not intend to accept or reject the plea agreement until sentencing when it had the opportunity to fully review all of the terms of the agreement. Both defense counsel and the court repeatedly discussed the fact that a written agreement was yet to be completed, and that it would ultimately be presented to the court prior to sentencing. The court also ordered that a presentence report be completed. Thus, the court's decision to wait until sentencing to accept or reject the plea agreement in order to review the terms of the plea agreement, as well as information with respect to a determination of whether the agreed-upon sentence was appropriate, was not error.[2] Moreover, because the parties and the court contemplated that the terms of the plea agreement would be finalized in writing prior to sentencing and because the court explicitly deferred its decision on the agreement until that time, the court's acceptance of Ball's guilty plea did not constitute acceptance of the plea agreement, such that the court would be bound by such an agreement.
Having determined that the district court's acceptance of Ball's guilty plea did not amount to acceptance of the plea agreement and that the court did not err in waiting until sentencing to accept or reject the plea agreement, we next consider Ball's contention that even if the court could choose not to follow the agreement, Ball should have been given the opportunity to withdraw the evaluations and proceed to sentencing before a different judge. When the court informed Ball that it was rejecting the plea agreement, Ball inquired as to whether the court would remove itself from the case, and the court responded that it would not. Ball contends that his statements at sentencing indicate that he believed the court conditioned its acceptance of the plea agreement only upon his participation in the evaluations, but that the court's acceptance of the plea agreement was not conditioned upon the results of the evaluations. Again, this argument is belied by the record.
The court, acknowledging that Ball's attorney had already discussed with him his rights relative to the evaluations, specifically informed him that he had the right not to participate in either the psychosexual evaluation or the polygraph examination. Defense counsel pointed out, however, that if he exercised his right and refused to participate, that would effectively reject the State's plea offer. The court recognized this fact, stating: "The State has made this a condition of the plea agreement that's been offered to you; so that's something I have no control over. That's just between you and the State." Thereafter, the court again inquired as to whether Ball understood that he had the right not to participate in the evaluations, and he responded in the affirmative. Whatever Ball's subjective intent may have been, the court gave no indication that its acceptance of the plea agreement was contingent upon his participation in the evaluations. The State, not the court, was bound by the terms of the plea agreement. See State v. Halbesleben, 147 Idaho 161, 171, 206 P.3d 867, 877 (Ct.App.2009) (district courts are not required to accept sentencing recommendations); see also State v. Rossi, 105 Idaho 681, 682, 672 P.2d 249, 250 (Ct.App.1983) ("a trial court is also not bound by a sentence recommendation made by the state even though that recommendation was offered in conjunction with a negotiated plea"). It was the State's promises that were contingent upon Ball's participation in the evaluations. This fact was borne out by defense counsel's statement highlighting that if Ball exercised his right not to participate in the evaluations, such action would be a rejection of the *461 State's offer. In addition, the court was careful to point out that the plea agreement was between Ball and the State, which the court had "no control over."
With respect to Ball's argument that because the court had already reviewed the evaluations, he should have been given the opportunity to withdraw the evaluations and be sentenced by a different judge, he again offers no authority for this contention.[3] The alternative to withdrawal of his plea that Ball seeks is not stated in the rule or demanded in the exercise of the court's discretion. Ball's participation in the evaluations, as the court noted, was a condition of the plea agreement, which the court had no control over. As the court was not bound by the agreement, it could freely consider the evaluations. Moreover, the court itself warned Ball that he was not required to participate in the evaluations. That Ball believed the court would accept the plea agreement if he participated in the evaluations does not change the fact that a court is free to reject any plea agreement where it concludes that the agreed-upon sentence does not appropriately reflect the goals of sentencing. See Halbesleben, 147 Idaho at 171, 206 P.3d at 877 ("It is already well-understood that district courts are not required to accept sentencing recommendations and, therefore, a district court exercising its discretion not to do so is not altogether unforeseeable when negotiating a plea agreement."). The court stated that it had rejected the plea agreement because it "[did not] think that the sentence that was contained in the plea agreement was sufficient to meet the goals of sentencing." The court alone has the discretion to impose a sentence and, acting within that discretion, may reject a plea agreement. Thus, unless and until the court accepts the plea agreement, thereby agreeing to be bound by its terms, it may reject it at any time prior to sentencing.

B. Excessive Sentence
Ball next argues that the court's imposition of a unified sentence of twenty years, with seven years determinate, upon his plea of guilty, was excessive. He acknowledges that his sentence is within the statutory limits. However, he contends that it is excessive under any view of the facts. An appellate review of a sentence is based on an abuse of discretion standard. State v. Burdett, 134 Idaho 271, 276, 1 P.3d 299, 304 (Ct.App.2000). Where a sentence is not illegal, the appellant has the burden to show that it is unreasonable, and thus a clear abuse of discretion. State v. Brown, 121 Idaho 385, 393, 825 P.2d 482, 490 (1992). A sentence may represent such an abuse of discretion if it is shown to be unreasonable upon the facts of the case. State v. Nice, 103 Idaho 89, 90, 645 P.2d 323, 324 (1982). A sentence of confinement is reasonable if it appears at the time of sentencing that confinement is necessary "to accomplish the primary objective of protecting society and to achieve any or all of the related goals of deterrence, rehabilitation or retribution applicable to a given case." State v. Toohill, 103 Idaho 565, 568, 650 P.2d 707, 710 (Ct. App.1982). Where an appellant contends that the sentencing court imposed an excessively harsh sentence, we conduct an independent review of the record, having regard for the nature of the offense, the character of the offender, and the protection of the public interest. State v. Reinke, 103 Idaho 771, 772, 653 P.2d 1183, 1184 (Ct.App.1982). When reviewing the length of a sentence, we consider the defendant's entire sentence. State v. Oliver, 144 Idaho 722, 726, 170 P.3d 387, 391 (2007).
Ball contends that the district court abused its sentencing discretion when it failed to adequately consider the mitigating circumstances in his case, including his remorse and acceptance of responsibility, as well as the support of his family and friends. The court did not abuse its discretion. The court noted *462 that the facts of this case were a "big factor" in the sentence imposed, stating:
We have a situation where we have a defendant in his 40'she's age 43 right nowwho had an ongoing sexual relationship with the victim, who was 16 years old. This was not an isolated event. It was an ongoing situation. And of greatest concern, however, is that, based on what I've seen in the material that's been supplied to me, is that it was not a consensual relationship. It was perpetuated by the defendant through threats to the victim, in effect blackmailing the victim through threats toto her to perpetuate the ongoing relationship.
The court specifically acknowledged each of the mitigating circumstances now argued on appeal, but ultimately concluded that they were outweighed by other factors. The court noted that the goal of protection of society was a "major concern." The court determined that the facts of the crime itself warranted the sentence imposed.
Applying the foregoing standards and having reviewed the record in this case, we cannot say that the district court abused its discretion.

III.

CONCLUSION
The district court did not err by refusing to be bound by the plea agreement. The district court did not abuse its discretion in sentencing Ball. Accordingly, Ball's judgment of conviction and sentence are affirmed.
Judge GUTIERREZ and Judge MELANSON concur.
NOTES
[1]  The record does contain a copy of a pre-trial settlement offer, signed by Ball and his attorney on March 20, 2008, that appears to include some of the terms the parties agreed upon. However, the copy is of such poor quality that the terms of the agreement are illegible. On June 23, 2008, the original date set for sentencing, defense counsel acknowledged that the plea agreement discussed at the arraignment had not been reduced to writing and that some of the items had not been completed. Counsel requested a continuance to "get those in," which the court granted. While the court indicated at sentencing that it had reviewed the plea agreement, it is unclear whether the agreement was ultimately reduced to writing as the record does not contain a written plea agreement.
[2]  We also note that Ball did not request a continuance in order to reduce the agreement to writing such that the court could fully consider it before Ball entered his plea of guilty. Nor did Ball include in the plea agreement a condition that he would not participate in the evaluations until the court had accepted the agreement.
[3]  Ball argues that while I.C.R. 11(f) allows the district court to defer its decision of whether or not to accept a plea agreement until after it has reviewed the presentence report, it does not give the court the same allowance for a psychosexual evaluation or a polygraph examination. As noted, the court expressly deferred its decision until sentencing, and it was not error to do so. Moreover, the court did order a presentence report and noted at sentencing that it had reviewed that report.
