
258 Wis.2d 281 (2002)
2002 WI App 244
653 N.W.2d 280
STATE of Wisconsin, Plaintiff-Respondent,
v.
Eric S. FENZ, Defendant-Appellant.
Nos. 01-1434-CR, 01-1435-CR, 01-1436-CR.
Court of Appeals of Wisconsin.
Submitted on briefs February 12, 2002.
Decided September 26, 2002.
*282 On behalf of the defendant-appellant, the cause was submitted on the briefs of Jacob W. Gobel of Krek & Associates, S.C. of Jefferson.
On behalf of the plaintiff-respondent, the cause was submitted on the brief of James E. Doyle, attorney general, and William L. Gansner, assistant attorney general.
Before Roggensack, Deininger and Lundsten, JJ.
*283 ¶ 1. ROGGENSACK, J.
Eric Fenz appeals his sentence for conviction of three counts of second-degree sexual assault and the court's order partially denying his motion for sentence modification. Fenz argues that the circuit court erroneously exercised its discretion when it used presentence credit as a factor in determining his sentence. Fenz also argues that the court erroneously added to his sentence the 342 days he spent in presentence custody and requests that we decrease his sentence by that amount. Because we conclude that the circuit court did not erroneously consider Fenz's presentence credit in determining an appropriate sentence and because Fenz was properly credited for time served, we affirm the imposed sentence and the circuit court's order partially denying his motion for sentence modification.

BACKGROUND
¶ 2. In January of 1996, Eric Fenz pled no contest to and was convicted of three counts of second-degree sexual assault of a child, contrary to WIS. STAT. § 948.02(2) (1999-2000).[1] The circuit court withheld imposition of a sentence and placed Fenz on *284 concurrent four-year probation terms for each count.[2] His probation was subsequently revoked, and he returned to court for sentencing. Following a hearing, the circuit court sentenced Fenz to a total of ten years in prison; six years on count one, to run concurrent with a two year term on count two and a consecutive four year term on count three.
¶ 3. At sentencing, the circuit court determined that Fenz was entitled to 342 days of sentence credit for time served. The court also determined that because of the severity of Fenz's crimes and his failure on probation, to protect the public Fenz needed to receive institutional sex offender treatment. Correctional authorities advised the court that completion of such a program required at least six years of incarceration. To ensure that Fenz remained in prison for a term sufficient to complete the program, the court considered three factors that would influence the amount of time Fenz would spend in prison: (1) his 342 days of sentence credit, (2) the first date when he would be eligible for parole and (3) his likely mandatory release date. The court concluded that, "10 years . . . will result in about 8 years, which is in excess of the 6 years that they need to run you through the treatment program."
¶ 4. Fenz entered the prison system and was designated to participate in the sex offender program anticipated by the circuit court. Fenz appealed the designation and was reassigned to a treatment program that required significantly less time to complete. Fenz filed a postconviction motion seeking modification of his sentence on two grounds: (1) the circuit court erroneously exercised its discretion when it considered the *285 amount of presentence credit as a factor in determining an appropriate sentence length and (2) reassignment to a shorter treatment program constituted a new factor which frustrated the intent of the court's sentence and rendered the imposed sentence excessive.
¶ 5. The circuit court rejected the first ground of Fenz's motion, ruling that the court was entitled to consider all relevant factors in determining an appropriate sentence length and that the amount of presentence credit was a "highly relevant" factor in determining a length of sentence necessary to ensure that Fenz received institutional treatment. The court, however, granted Fenz's motion on the second ground and reduced his sentence from ten to six years. The court emphasized that because its intent in sentencing Fenz was to ensure that he receive treatment, reassignment to a shorter treatment program justified modifying Fenz's sentence downward. Fenz appeals his current sentence and the court's order partially denying his motion for sentence modification.

DISCUSSION
Standard of Review.
[1]
¶ 6. Sentencing is committed to the sound discretion of the circuit court, and our review is limited to determining whether the court erroneously exercised its discretion. McCleary v. State, 49 Wis. 2d 263, 278, 182 N.W.2d 512, 520 (1971).
Presentence Credit.
[2-4]
¶ 7. Our limited review of sentencing reflects a strong public policy against interference with sentencing *286 discretion; we presume that the circuit court acted reasonably and assign to the defendant the burden to "show some unreasonable or unjustified basis in the record for the sentence." State v. Harris, 119 Wis. 2d 612, 622-23, 350 N.W.2d 633, 638-39 (1984). Fenz argues that the circuit court erred when it used the amount of his presentence credit as a factor in determining an appropriate sentence. An erroneous exercise of discretion may occur when a court has made a decision without explaining its reasoning or when a sentence has been based on clearly improper factors. State v. Wickstrom, 118 Wis. 2d 339, 354-55, 348 N.W.2d 183, 191 (Ct. App. 1984). Fenz contends that his constitutional right to receive "a just and deserving sentence" was compromised when the court failed to follow the sentencing procedure established in Klimas v. State, 75 Wis. 2d 244, 249 N.W.2d 285 (1977) and later reaffirmed in Struzik v. State, 90 Wis. 2d 357, 279 N.W.2d 922 (1979). We disagree.
¶ 8. In Klimas, the supreme court established a procedure for applying presentence credit against a sentence. Klimas, 75 Wis. 2d at 252, 249 N.W.2d at 289. The supreme court ruled that the equal protection provisions of the Fourteenth Amendment compelled it to reduce a sentence by the amount of credit due the defendant for time served in custody. Id. at 250, 249 N.W.2d at 288. The court suggested the following sentencing procedure:
[T]he trial judge [should] sentence for the gross amount that he concludes, in his discretion, to be appropriate. He then should make a separate finding that the defendant has . . . been obliged to remain in custody for the ascertained period, and that such period of time be deemed time served in partial satisfaction of *287 the sentence, and which time shall be credited as time served by the confining authority.
Id. at 252, 249 N.W.2d at 289.[3]
¶ 9. The supreme court reaffirmed this procedure in Struzik, 90 Wis. 2d at 367, 279 N.W.2d at 926. In Struzik, the circuit court acknowledged at sentencing that Struzik was entitled to fourteen days credit for time served in custody prior to posting bail. Id. However, the court nullified this credit by sentencing Struzik to five years and fourteen days. Citing Klimas, the supreme court concluded that the circuit court's procedure was an erroneous exercise of discretion because proper procedure required the court to "first determine an appropriate sentence, then determine the time spent in preconviction custody, and finally credit that time toward the sentence imposed." Id. at 367-68, 279 N.W.2d at 926.
¶ 10. Fenz argues that Klimas and Struzik established a "bright line" rule for circuit courts to follow when applying credit for time served against a sentence. While we agree that Klimas and its progeny established a general rule for applying sentence credit, the circuit court's decision here does not run afoul of that Klimas/Struzik rule. The circuit court determined that Fenz needed to receive institutional sex offender treatment and that completion of that program required at least six years incarceration. In order to accomplish this very specific incarceration goal, it was *288 necessary for the court to consider those factors that would influence the amount of time Fenz actually would spend in prison. This determination required consideration of the amount of presentence credit. Accordingly, we conclude that the circuit court properly employed the Klimas/Struzik rule because it articulated a specific time-related incarceration goal and that goal required the court to consider the presentence credit due Fenz.
[5]
¶ 11. Our holding is consistent with both Klimas and Struzik where the supreme court stated that, at sentencing, the circuit court's first responsibility is to determine an appropriate sentence. See Klimas, 75 Wis. 2d at 252, 249 N.W.2d at 289; Struzik, 90 Wis. 2d at 367, 279 N.W.2d at 926. Again in State v. Walker, 117 Wis. 2d 579, 345 N.W.2d 413 (1984), the supreme court stated that "trial judges are first to determine and impose an appropriate sentence." Walker, 117 Wis. 2d at 586, 345 N.W.2d at 416 (emphasis added). In order to fashion an appropriate sentence, the circuit court is entitled, indeed required, to consider all legally relevant factors. See Anderson v. State, 76 Wis. 2d 361, 364, 251 N.W.2d 768, 770 (1977). Here, one of the relevant factors is the length of Fenz's presentence custody because it will affect the time he actually spends in prison. His expected incarceration term impacted the circuit court's goal that Fenz receive sex offender treatment in an institutional setting while not remaining incarcerated longer than was necessary to receive treatment. And unlike Struzik, the circuit court did not tack onto the sentence chosen the amount of time served; rather, the *289 circuit court used presentence credit as a factor to fashion a sentence appropriate to achieve the court's goal in the first instance.[4]
¶ 12. In concluding that a court may, in specific circumstances, consider presentence credit as a factor in determining an appropriate sentence, we remain mindful of a defendant's constitutional right to receive credit for time already served. Here, the record indicates that Fenz was credited 342 days for time served. Therefore, we affirm Fenz's sentence and the court's order partially denying sentence modification.

CONCLUSION
¶ 13. Because we conclude that the circuit court did not erroneously consider Fenz's presentence credit in determining his sentence and because Fenz was properly credited for time served, we affirm his sentence and the circuit court's order partially denying his motion for sentence modification.
By the Court.Judgment and order affirmed.
NOTES
[1]  Fenz was originally charged in three separate complaints involving three different victims with a total of four counts of second-degree sexual assault of a child, one count of second-degree sexual assault of a child by use of force and one count of first-degree sexual assault of a child. The circuit court consolidated the three cases and they remain consolidated. All references to the Wisconsin Statutes are to the 1999-2000 version unless otherwise noted. WISCONSIN STAT. § 948.02(2) has not been amended in a manner that would alter the disposition of this case since Fenz's conviction.
[2]  As a condition of probation, the court required Fenz to receive counseling including sex offender treatment.
[3]  The procedure outlined in Klimas was subsequently codified in WIS. STAT. § 973.155(2) (1999-2000). Section 973.155(2) provides that "[a]fter the imposition of sentence, the court shall make and enter a specific finding of the number of days for which sentence credit is to be granted, which finding shall be included in the judgment of conviction."
[4]  The record unequivocally demonstrates that the circuit court's intent was to ensure that Fenz remained in prison long enough to complete a sex offender treatment program. The court stated this intent at original sentencing and later reduced the sentence because correctional authorities placed Fenz in a treatment program that required significantly less time to complete.
