
192 Wis.2d 870 (1995)
532 N.W.2d 423
STATE of Wisconsin, Plaintiff-Respondent,[]
v.
Evaristo AVILA, Defendant-Appellant.
No. 93-2794-CR.
Supreme Court of Wisconsin.
Oral argument January 12, 1995.
Decided May 11, 1995.
*876 For the defendant-appellant there was a brief and oral argument by Jack E. Schairer, first assistant state public defender.
For the plaintiff-respondent the cause was argued by Paul Lundsten, assistant attorney general, with whom on the brief was James E. Doyle, attorney general.
WILLIAM A. BABLITCH, J.
Evaristo Avila, convicted of a number of criminal offenses, appeals from a judgment of conviction and an order of the circuit court denying post-conviction relief. He argues: (1) that denying him credit for the time he spent incarcerated prior to trial because of indigency, against jail time imposed as a condition of probation, denies him the equal protection of the laws; (2) that under sec. 973.04, Stats., the prison time he served pursuant to a judgment of conviction, which was later vacated upon a plea withdrawal, must be credited against his jail time imposed as a condition of probation; (3) that the standard reasonable doubt jury instruction, Wis. JICriminal 140 (1991), violates due process by diluting the State's burden of proving guilt beyond a reasonable doubt; and (4) that he is entitled to a new trial because the circuit court failed to instruct the jury on the weapons penalty enhancer in sec. 939.63 in a manner consistent with this court's recent holding in State v. Peete, 185 Wis. 2d 4, 517 N.W.2d 149 (1994).
*877 We affirm the order of the circuit court. We reverse the judgment of conviction on possession with intent to deliver while possessing a dangerous weapon and consistent with Peete, remand and direct the circuit court to enter a judgment of conviction solely on the charge of possession of cocaine with intent to deliver. Further, Avila is entitled to a new trial on the issue of whether he was guilty of possession with intent to deliver while possessing a dangerous weapon. Finally, Avila's sentence with regard to the possession of cocaine with intent to deliver while armed should be vacated and Avila should be resentenced solely on the charge of possession with intent to deliver. In the event that he is retried, the court should vacate the sentence and resentence him after the new trial.
The facts for purposes of this appeal are undisputed. On October 9, 1991, Avila was arrested and charged with possession of a controlled substance which does not bear a tax stamp, possession of cocaine with the intent to deliver while possessing a dangerous weapon, and possession of marijuana. Because his indigency precluded him from posting bail, which was set at $10,000, he remained incarcerated for 145 days until March 4, 1992, when bail was reduced to $1,000. Avila remained out on bail until April 23, 1992, when he pled no contest to possession of cocaine with intent to deliver, and was sentenced to a term of two years in the Wisconsin State Prisons less 198 days of credit for pretrial incarceration. (The court apparently erred in crediting him for 198 days rather than 145 days.)
After serving 232 days in prison, Avila moved to withdraw his plea on the basis that he had not been informed that a plea of no contest could affect his status as a legal alien and that the Immigration Service could institute deportation proceedings against him. *878 Avila's motion was granted, and three days later he was released on a signature bond.
On May 12, 1993, a jury found Avila guilty of party to the crime of possessing a controlled substance which does not bear evidence of a tax stamp, possession of cocaine with intent to deliver while possessing a dangerous weapon, and possession of marijuana. Avila was sentenced to two years in the state penal institution on count one, four years on count two, and six months on count three. All sentences were stayed, and he was placed on probation for five years with one year in the county jail as a condition of probation, less three months credit for good time. In addition, he was granted work release privileges and was given 446 days of credit in the event his probation was revoked.
In a postconviction motion, Avila requested credit for the time he spent incarcerated prior to trial due to his indigency. He claimed that denying him pretrial detention credit on his jail time imposed as a condition of probation would violate his right to equal protection of the laws. Further, he requested credit under sec. 973.04,[1] Stats., for the time he was incarcerated in the state prison as a result of his original sentence, and good time credit. Finally, he argued that Wis. JICriminal 140 (1991) on reasonable doubt dilutes the State's burden of proving guilt beyond a reasonable doubt and thus violates the Due Process Clause of the Fourteenth Amendment.
The circuit court granted Avila's request for good time credits and denied the balance of Avila's postconviction *879 motion. Avila appealed raising the additional issue that the State failed to prove possession of cocaine with a weapons enhancer since the enhancer for possessing a dangerous weapon is applicable only where actual possession, as opposed to constructive possession, is proved. In light of this court's recent decision in Peete, 185 Wis. 2d at 9, which resolves this issue, Avila now argues that he is entitled to a new trial because the circuit court failed to instruct the jury according to Peete. The court of appeals certified to this court the issues regarding credit for prior incarceration. We accepted certification on all issues raised before the court of appeals.
Because Avila has successfully completed his condition of probation, the issues with regard to credit for pretrial incarceration are moot as to Avila. However, these issues, which raise important questions of law and are likely to recur in the future, evade review because of the limited time a court may order a probationer confined. Therefore, we consider the issues in this appeal. See State ex rel. La Crosse Tribune v. Circuit Ct., 115 Wis. 2d 220, 229, 340 N.W.2d 460 (1983).

I. Equal Protection
Avila spent time in jail prior to trial because his indigency precluded him from posting bond. He argues that failure to credit that pretrial detention time against the jail time he received as a condition of probation at sentencing following trial denies him the equal protection of the law.
[1,2]
The guarantees of equal protection in the United States and Wisconsin Constitutions[2] require that persons *880 similarly situated be accorded similar treatment. Walters v. City of St. Louis, 347 U.S. 231, 237 (1954). This does not require, however, that all persons be dealt with identically. Id. Rather, equal protection is only denied when persons similarly situated are classified in an irrational or arbitrary manner. Locklear v. State, 86 Wis. 2d 603, 611, 273 N.W.2d 334 (1979). The test is whether there exists any rational basis to justify the classification. Id. See also Hilber v. State, 89 Wis. 2d 49, 54, 277 N.W.2d 839 (1979) ("[D]ifferences in the treatment of criminal offenders have been viewed as being subject to the rational basis test").
Avila contends that because his pretrial detention was based upon his inability to post cash bail, he was required to serve more actual total confinement than one who receives the same confinement condition but who was able to post bond and obtain liberty prior to trial. That is, persons similarly situated to him who are able to post bond are subject to a lesser period of confinement.
We concede that on its face, this classification appears to discriminate against indigents who are confined as a condition of probation. Therefore, we must determine whether there is any rational basis for such *881 classification. We conclude that there is a rational basis.
[3]
Our court has recognized that the Equal Protection Clause of the Federal Constitution and the Fourteenth Amendment require that all periods of custody occasioned by indigency shall be credited, as time already served, on the sentence imposed. See Klimas v. State, 75 Wis. 2d 244, 249, 249 N.W.2d 285 (1977). We reasoned in Klimas that discrimination imposed upon the poor who are unable to post bail prior to trial is tolerable in light of the State's overriding need to compel appearance at trial. Id. We stated, however, that after trial that need ends: "[t]here is no constitutionally sufficient reason to permit the pretrial discrimination on the basis of wealth to go unrectified.... Id.
That reasoning, while applicable to cases in which a defendant is sentenced to prison, does not apply to probationers. Unlike a prison sentence in which punishment is the primary goal, probation is designed to rehabilitate. The need to implement the rehabilitation process serves as the rational basis for the classification.
"The conditions of probation are supposed to be tailored to serve the dual purposes of probation, i.e., to protect the public from criminal conduct and to help the probationer become a useful member of society." Wagner v. State, 89 Wis. 2d 70, 77, 277 N.W.2d 849 (1979). The theory is that an individual convicted of a crime "who is responsive to supervision and guidance may be rehabilitated without placing him or her in prison." State v. Hays, 173 Wis. 2d 439, 445, 496 N.W.2d 645 (Ct. App. 1992). Temporary confinement, often imposed in conjunction with other probation conditions, is aimed at rehabilitation; it is an effort to *882 gradually ease the offender back into society by providing intense supervision and an opportunity to continue working independently outside the facility.
The ABA in its SENTENCING ALTERNATIVES & PROCEDURES, Standard 18-2.4 cmt. at 102 (1979), recognizes the benefits of temporary confinement in a local jail or facility:
[A] phased release of the offender is often desirable ... and with the goal of a community-based system of corrections that minimizes the dislocation of the offender while maximizing the availability of local services and resources for the offender.
Among the advantages of confinement in a local county jail or Huber facility are: "the reduced stress and hardship on the offender and the offender's family, the useful educational and vocational training that can be afforded, and the possibility of significant individual adjustments." Id. The ABA STANDARDS FOR CRIMINAL JUSTICE SENTENCING, Standard 18-3.19 cmt. at 128-29 (1994), expands on Standard 18-2.4: "[Periods of intermittent confinement] do not isolate the offender completely from the outside world, which can include the workplace, home, friends, and family, so that over time the offender can be better prepared for a smooth transition to law-abiding society." Further, the commentary to Standard 18-3.19 cites an instructive example of how temporary confinement with work release can assist the rehabilitation of an offender convicted of spousal abuse:
It may be that the offender has no tendency toward abuse during the workday, so that a targeted effort at disablement will prove effective.... [I]t may be discovered that the offender abuses his wife only when intoxicated. If the intermittent confinement *883 program includes frequent monitoring for substance abuse, and succeeds in enforcing periods of sobriety, the program can help prevent circumstances that might otherwise contribute to new offenses.
It has also been recognized that a confined probationer can often hold a job and continue to support his or her family while being rehabilitated. See Neil P. Cohen & James J. Gobert, The Law of Probation And Parole, sec. 6.07 at 241 (1983). Further, imprisonment imposed as a condition of probation serves as a rehabilitative device giving the offender a taste of prison and vividly demonstrating what will happen if he or she violates the terms of probation.[3]
*884 Because confinement in a local facility is often so beneficial to an offender, it is essential that a court have the discretion to impose this type of confinement without the risk of having the confinement reduced by pretrial detention credit. This is especially necessary in light of the limited time with which a court has to work: a circuit court may only order confinement for a maximum of one year. If an offender has a lengthy history of pretrial detention, the period of confinement imposed by the court could be significantly lessened or in some cases completely eviscerated. In those cases a court has a number of options: sentence an offender to prison, confine an offender in a local facility for less than a desirable time period, or release an offender on probation. Denying pretrial detention credits for persons confined as a condition of probation offers the court another optionplacing the defendant on probation with a condition of temporary confinement in a local jail or rehabilitative facility for what the court deems a necessary and appropriate time period. The need for this other option serves as the rational basis for denying pretrial detention credits to indigents temporarily confined as a condition of probation.
[4]
Therefore, we conclude that there is a rational basis for distinguishing between indigents confined as a condition of probation and non-indigents confined as a condition of probation. Requiring a court to credit pretrial detention against the indigent offender's probationary confinement would strip the court of its ability to craft the probation and confinement so as to best assist the rehabilitation of the offender and his or her reintegration into society. Simply put, "[t]he trial court should have leeway if probation is to be an effective tool of rehabilitation." Prue v. State, 63 Wis. 2d *885 109, 114, 216 N.W.2d 43 (1974). Accordingly, we affirm this portion of the circuit court's order.

II. Credit under sec. 973.04, Stats.
Next, Avila asserts that under sec. 973.04, Stats., he is entitled to credit against his confinement as a condition of probation for the time he spent serving his original two-year sentence before withdrawing his plea. Section 973.04 provides: "When a sentence is vacated and a new sentence is imposed upon the defendant for the same crime, the department shall credit the defendant with confinement previously served." The State contends that confinement as a condition of probation is not a "sentence" for purposes of this statute, and therefore, Avila is not entitled to credit.
[5,6]
Resolution of this issue requires us to interpret sec. 973.04, Stats. The interpretation of a statute is a question of law which we review de novo. Revenue Dept. v. Milwaukee Brewers, 111 Wis. 2d 571, 577, 331 N.W.2d 383 (1983). We first consider the plain language of the statute to determine whether its intent is clear on its face. Voss v. City of Middleton, 162 Wis. 2d 737, 749, 470 N.W.2d 625 (1991).
[7]
We conclude that intent of the statute is clear on its face. The statute provides that credit shall be granted when a new "sentence" is imposed. We have long held that confinement as a condition of probation is not considered a "sentence." See Prue, 63 Wis. 2d at 114; State v. Gloudemanns, 73 Wis. 2d 514, 519, 243 N.W.2d 220 (1976). In Prue, we were asked to determine whether a defendant who had been confined in a reforestation camp as a condition of probation under sec. 973.09(1), Stats., was entitled to good time credits *886 pursuant to sec. 56.07. Prue, 63 Wis. 2d at 111-12. Section 56.07 provided: "Inmates of a reforestation camp sentenced to such camp for less than one year or in lieu of a county jail sentence shall be subject to [the good time credit statute]." Relying in Prue on several sources which recognized the difference between a sentence and probation, id. at 114, we concluded that the term "sentence" in sec. 56.07 did not include confinement as a condition of probation in a reforestation camp. As such, a defendant confined in a reforestation camp pursuant to probation was not entitled to good time credits under sec. 56.07. We stated:
Probation is an alternative to a sentence; ... There are public policy considerations why a committing court should have a wide choice in dealing with a convicted person in regard to his punishment and rehabilitation. The trial court should have leeway if probation is to be an effective tool of rehabilitation. Id.

[8]
This same reasoning is applicable to sec. 973.04, Stats. We distinguish between confinement as a condition of probation and a sentence within the context of this statute in order to recognize the respective goals of each: rehabilitation and punishment. Unlike a prison sentence, probation is designed to "permit the offender to `prove' himself or herself without being punishedto foster rehabilitation and to `help the probationer become a useful member of society.'" State v. Meddaugh, 148 Wis. 2d 204, 212, 435 N.W.2d 269 (1988) (citing Wagner v. State, 89 Wis. 2d 70, 77, 277 N.W.2d 849 (1979). As stated in depth earlier in this opinion, this is accomplished by affording the circuit court latitude in determining appropriate conditions of *887 probation such as a temporary period of confinement. Consistent with this reasoning, we conclude that confinement as a condition of probation is not a "sentence" for purposes of sec. 973.04. Accordingly, we affirm the order of the circuit court.
We do not address Avila's argument that denying credit for the earlier time spent in prison could force a person in his position to be incarcerated longer than the maximum sentence for the crime. Avila has already completed his time in county jail, and thus the issue is moot as applied to him. Furthermore, a probationer would not be forced to spend more time in jail (while on probation) than the maximum sentence for the crime because the probationer retains the right to refuse probation. See Garski v. State, 75 Wis. 2d 62, 77, 248 N.W.2d 425 (1977). Finally, the total time Avila spent incarcerated did not exceed the maximum sentence under the statutes. Accordingly, we affirm this portion of the circuit court's order.
III. Reasonable Doubt Jury Instruction
[9]
The Due Process Clause of the Fourteenth Amendment places upon the prosecution in state criminal trials, the burden of proving all elements of the offense charged, see Sullivan v. Louisiana, 113 S.Ct. 2078, 2080 (1993), and the burden of proving "beyond a reasonable doubt" every fact necessary to establish those elements, In re Winship, 397 U.S. 358, 364 (1970).
Avila asserts that the reasonable doubt jury instruction which was recited at trial by the circuit court, Wis. JICriminal 140 (1991), improperly dilutes the State's burden of proof and as such is constitutionally infirm. The court instructed the jury:

*888 In reaching your verdict, examine the evidence with care and caution. Act with judgment, reason and prudence.
The defendant is not required to prove his innocence. The law presumes every person charged with the commission of an offense to be innocent. This presumption requires a finding of not guilty unless in your deliberations you find it is overcome by evidence which satisfies you beyond a reasonable doubt that the defendant is guilty. The burden of establishing every fact necessary to constitute guilty is upon the State. Before you may return a verdict of guilty, the evidence must satisfy you beyond a reasonable doubt that the defendant is guilty.
If you can reconcile the evidence upon any reasonable hypothesis consistent with the defendant's innocence, you should do so and find him not guilty. The term reasonable doubt means a doubt based upon reason and common sense. It is a doubt for which a reason can be given arising from a fair and rational consideration of the evidence or lack of evidence. It means such a doubt as would cause a person of ordinary prudence to pause or hesitate when called upon to act in the most important affairs of life. A reasonable doubt is not a doubt which is based upon mere guesswork or speculation. A doubt which arises merely from sympathy or from fear to return a verdict of guilty is not a reasonable doubt. A reasonable doubt is not a doubt such as may be used to escape the responsibility of a decision. While it is your duty to give the defendant the benefit of every reasonable doubt, you should not search for doubt. You should search for the truth.
The underlined portion of the instruction is that which Avila challenges. He maintains that, in light of *889 this language, a juror acting reasonably would be reasonably likely to impose a lesser burden than reasonable doubt upon the State. Further, he argues that the language implies that truth and doubt are two separate concepts, i.e., that finding doubt would mean not finding the truth.
[10]
When faced with this type of challenge, our duty is to examine the jury instruction as a whole, see Victor v. Nebraska, 114 S. Ct. 1239, 1243 (1994), to determine "whether there is a reasonable likelihood that the jury understood the instructions to allow conviction based on proof insufficient to meet the Winship standard." Id.
[11]
We conclude that it is not reasonably likely that the jury understood Wis. JICriminal 140 (1991), to allow conviction based on proof below the Winship reasonable doubt standard. As we are instructed by Victor, we examine the objected to language within the context of the entire instruction.
Throughout, the instruction underscores that the defendant is presumed innocent and the State bears the burden of proving the defendant's guilt beyond a reasonable doubt. The instruction begins by recognizing the burden which must be overcome in order to find the defendant guilty: "This presumption [of innocence] requires a finding of not guilty unless in your deliberations you find it is overcome by evidence which satisfies you beyond a reasonable doubt that the defendant is guilty." Immediately thereafter, the instruction indicates who bears that burden: "The burden of establishing every fact necessary to constitute guilt is upon the State." Again, the instruction emphasizes to the jury the onerous burden in finding the defendant guilty: "Before you may return a verdict of guilty, the *890 evidence must satisfy you beyond a reasonable doubt that the defendant is guilty." It further adds that if the jury "can reconcile the evidence upon any reasonable hypothesis consistent with the defendant's innocence, [it] should do so and find him not guilty."
It is at this point, after clearly articulating that the defendant is presumed innocent until the State proves his or her guilty beyond a reasonable doubt, that the instruction defines a "reasonable doubt." It is a doubt, the instruction states, which is based upon "reason and common sense." It is not based upon guesswork nor does it arise merely from sympathy or fear of returning a guilty verdict. It is a doubt which would cause an ordinary person to pause or hesitate when called upon to act in the most important affairs of life.
[12]
Having defined "reasonable doubt," the instruction again reminds the jury that "it is your duty to give the defendant the benefit of every reasonable doubt." And finally, the instruction tells the jury not to search for doubt, but search for the truth. The instruction as a whole emphasizes with great clarity that the State bears the burden of proving the defendant's guilt beyond a reasonable doubt, and that a defendant is presumed innocent until that burden is met. In the context of the entire instruction, we conclude that Wis. JICriminal 140 (1991), which was read to the jury, did not dilute the State's burden of proving guilt beyond a reasonable doubt. Accordingly, we affirm this portion of the circuit court's order.

IV. Weapons Penalty Enhancer
Finally, Avila asserts that he is entitled to a new trial because the circuit court erred in instructing the jury on sec. 939.63(1)(a), Stats., which establishes an *891 enhanced penalty for a person who commits a crime while possessing a dangerous weapon. That statute provides:
If a person commits a crime while possessing, using or threatening to use a dangerous weapon, the maximum term of imprisonment prescribed by law for that crime may be increased ... [the statute proceeds to set increased penalties which vary according to the penalty for the predicate offense].
Specifically, Avila contends that under this court's recent decision in Peete, 185 Wis.2d at 9, the court erred when it failed to instruct the jury that the State must prove the existence of a nexus between the crime and the weapon. That is, that the State must prove "that the defendant possessed the weapon to facilitate commission of the predicate offense." Id. We agree; Peete is directly on point with this case. In Peete, a defendant was convicted of possession of cocaine with intent to deliver while armed under secs. 161.16(2)(b)1, 161.41(1m)(c)2, and 939.63(1)(a)3, Stats. Id. This court addressed two issues on review: (1) whether sec. 939.63 penalized both actual possession and constructive possession; and (2) whether the language in sec. 939.63, "while possessing" required the State to prove the existence of a nexus between the crime and the weapon. Id.
As to the first issue, we concluded that the language in sec. 939.63, Stats., "while possessing" included both actual possession and constructive possession. We reasoned that such an interpretation was consistent with prior interpretations of the term "possession" in Wisconsin criminal statutes. Id.
As to the second issue, we concluded that the language in sec. 939.63, Stats., required the State to prove a nexus between the crime and the offense. Id. at 18. *892 We stated that the enhanced penalty could not be imposed unless the State proved the existence of the nexus beyond a reasonable doubt. Further, we added:
A circuit court must instruct the jury on the definition of possession; on the nexus requirement, that the defendant possessed the weapon to facilitate the predicate crime; and on the definition of dangerous weapon. The enhanced penalty can only be imposed when the state proves the existence of each of these elements beyond a reasonable doubt. Id. at 21.
Because the circuit court in Peete had not instructed the jury properly, and thus, the State did not prove the elements of the weapons enhancer beyond a reasonable doubt, we reversed the judgment of conviction and remanded the cause to the circuit court with directions to enter a judgment of conviction against Peete solely on possession of cocaine with intent to deliver. We further directed the circuit court to conduct a new trial on the issue of whether the defendant was guilty of committing the predicate offense while possessing a dangerous weapon. Finally, we directed the circuit court to vacate defendant's sentence and resentence him after a new trial. Id. at 23.
[13]
This case mirrors Peete. Avila was charged with possession of cocaine with intent to deliver while possessing a dangerous weapon. The circuit court did not instruct the jury on the nexus requirement nor on the other elements set forth in Peete, and the State did not prove the elements of the weapons penalty enhancer beyond a reasonable doubt. Consistent with Peete, we reverse Avila's judgment of conviction on possession with intent to deliver while possessing a dangerous weapon, and direct the court to enter a judgment of *893 conviction solely on possession of cocaine with intent to deliver. Further, Avila is entitled to a new trial on the issue of whether he was guilty of possession with intent to deliver while possessing a dangerous weapon. Finally, Avila's sentence with respect to the possession of cocaine with intent to deliver while armed should be vacated and Avila should be resentenced solely on the charge of possession with intent to deliver. In the event that he is retried, the court should vacate the sentence and resentence him after the new trial. As we stated in Peete, "[sec]. 939.63 provides an enhancement to the penalty for the predicate offense and thus a circuit court sets one sentence for a defendant convicted of committing a predicate offense while possessing a dangerous weapon. The circuit court cannot sentence [defendant] on his conviction for possession of cocaine with intent to deliver until a jury makes the additional determination of whether [defendant] is guilty of the conduct prohibited by sec. 939.63." Id. at 23-24. [Footnotes omitted.]
[14,15]
The State argues that neither a new trial nor resentencing are necessary here. It contends that because the circuit court did not sentence Avila beyond the maximum for the predicate offense, the weapons penalty enhancer was not utilized. Therefore, the court's error in instructing the jury on the enhancer was harmless. The State directs us to State v. Harris, 119 Wis. 2d 612, 617, 350 N.W.2d 633 (1984), and State v. Farr, 119 Wis. 2d 651, 660, 350 N.W.2d 640 (1984). The court in Harris and Farr, in the context of the repeater penalty enhancement statute, sec. 939.62, Stats., determined that the repeater statute does not apply until and unless the maximum sentence is imposed for the crime which the defendant was convicted. *893a Harris, 119 Wis. 2d at 617; Farr, 119 Wis. 2d at 660. The court in Harris stated that "being a repeater is not a crimeit is a status...." Harris, 119 Wis. 2d at 618. It went on in Farr to add: "[t]he only consequence of the state proving the defendant to be a repeater is that the defendant is subjected to the possibility of a sentence longer than the maximum one provided by law for the offense for which the defendant is convicted." Farr, 119 Wis. 2d at 661.
The State's reliance on Harris and Farr is misplaced. Peete makes clear that the weapons penalty enhancer is an element of the predicate offense, and as such, the State must prove the elements of the enhancer beyond a reasonable doubt regardless of the length of the sentence imposed. Id. at 24 n.11. When a jury does not make a finding of guilty beyond a reasonable doubt on an element of the crime, a court cannot conclude that a deficient jury instruction with regard to that element is harmless error. "There being no jury verdict of guilty-beyond-a-reasonable-doubt, the question whether the same verdict of guilty-beyond-a-reasonable-doubt would have been rendered absent the constitutional error is utterly meaningless." Sullivan v. Louisiana, 113 S. Ct. 2078, 2082 (1993). Accordingly, the State's argument is without merit.
By the Court.The order of the circuit court is affirmed and the judgment of conviction is reversed in part and remanded for proceedings consistent with this opinion.
The following memorandum was filed July 31, 1995.
PER CURIAM
The state has moved for reconsideration of that portion of the decision which vacates the *893b conviction for possession of cocaine with intent to deliver while possessing a dangerous weapon and, if defendant is not retried, directs that he be resentenced without consideration of the weapons penalty enhancer.
[16]
Section 939.63(2), Stats. requires that a person convicted of committing a felony while possessing a dangerous weapon be sentenced to a minimum term of imprisonment unless an explanation is provided for a shorter sentence. The sentence imposed here was greater than that minimum but less than the maximum. As in Peete, this court cannot ascertain from the record whether a portion of the sentenceeven though the maximum wasn't reachedwas nonetheless due to the invalid enhancer. Thus resentencing is necessary.
[17]
The state correctly notes however that, contrary to the statement in the opinion, a weapons penalty enhancer is an element of the enhanced offense when that offense is charged, but not the underlying offense itself.
The state's motion for reconsideration is denied.
NOTES
[]  Motion for reconsideration denied July 31, 1995. Per Curiam issued July 31, 1995.
[1]  Section 973.04, Stats., (1991-92), provides:

Credit for imprisonment under earlier sentence for the same crime. When a sentence is vacated and a new sentence is imposed upon the defendant for the same crime, the department shall credit the defendant with confinement previously served.
[2]  Wis. Const. Art. I, § 1 (1986), provides:

All people are born equally free and independent, and have certain inherent rights; among these are life, liberty and the pursuit of happiness; to secure these rights, governments are instituted, deriving their just powers from the consent of the governed.
The U.S. Const. amend. XIV, § 1, provides in relevant part:
No State shall make or enforce any law which shall ... deny to any person within its jurisdiction the equal protection of the laws.
We afford identical interpretation to the Equal Protection Clause of the Wisconsin and United States Constitutions. Szarzynski v. YMCA, Camp Minikani, 184 Wis. 2d 875, 887 n.5, 517 N.W.2d 135 (1994).
[3]  For additional case law recognizing the distinction between goals of sentencing and sentencing alternatives, see State v. Aderhold, 91 Wis. 2d 306, 313, 284 N.W.2d 108 (Ct. App. 1979) (holding that equal protection does not require "street time" spent on probation to be deducted from a prison sentence to be served following a revocation hearing); State v. Nyborg, 122 Wis. 2d 765, 771, 364 N.W.2d 553 (Ct. App. 1985) (holding that prisoner was not denied equal protection by inapplicability of extra good time statute to county jail inmates); U.S. v. Dowling, 962 F.2d 390, 394 (5th Cir. 1992) (holding that the need for rehabilitation was a rational basis for disparate treatment in awarding credit time toward a sentence of imprisonment and denying it to a term of probation); McGinnis v. Royster, 410 U.S. 263, 270-73 (1973) (concluding that a rational basis existed for denying prisoners good time credit for the period of presentence confinement in county jail while giving those out on bail good time credit for the entire time in custody); People v. Miles, 368 N.E.2d 187, 191-92 (Ill. App. Ct. 1977) (holding that it was not a violation of equal protection to deny credit to persons convicted and placed on probation while granting credit to those convicted and sentenced to prison).
