dissenting.
In 1990 the trial court imposed an illegal, extended sentence under the mandatory extended-term provisions of the Graves Act. N.J.S.A. 2C:43-6c. (Commit certain crimes with a gun twice and you will go to prison for a very long time.) On defendant’s appeal to the Appellate Division, the State acknowledged that the sentence was illegal when imposed. Rather than correct that judicial error, this Court takes advantage of an unusual chronology of events to reinstate a sentence that was illegal when given. In doing so, it designs a system of temporary sentencing that is neither authorized by law nor realistically required to impose a sentence that is appropriate for a criminal such as Haliski.
I
“As a general rule of statutory construction, we look first to the language of the statute. If the statute is clear and unambiguous on its face and admits of only one interpretation, we need delve no deeper than the act’s literal terms to divine the Legislature’s intent.” State v. Butler, 89 N.J. 220, 226, 445 A.2d 399 (1982). There is nothing in the language of the New Jersey Code of Criminal Justice that authorizes the Court’s decision.
We have always followed the language of the Code. In State v. Hawks, 114 N.J. 359, 554 A.2d 1330 (1989), we applied the mandatory extended-term provisions of the Graves Act to a defendant who committed two Graves Act offenses on separate occasions, but was convicted of the second offense before he was convicted of the first. We acknowledged the potential for results *26that might be unfair or unforeseen when the orders of offense and conviction are reversed. But we shrugged off those concerns, being obliged to apply “the legislation as we understand it.” Id. at 367, 554 A.2d 1330. The Code’s definition of a “prior conviction” of a Graves Act crime does not require that the prior conviction be for a crime committed prior in time. Had the Code contemplated the temporary sentencing now suggested by the Court, Justice Clifford’s task of writing the Hawks opinion would have been much easier; the Court could have fashioned a temporary sentence for the offense second in time, and increased or decreased it later.
We have always respected the language of the Code even when we believed that the Legislature might actually agree that changes should be made. See State v. Cannon, 128 N.J. 546, 608 A.2d 341 (1992) (refusing to allow admission of first- and second-degree offenders into Intensive Supervision Program because the language of the Code did not permit it). Even when sound policy considerations exist, it is not the function of courts to amend statutes. If legislation needs correction, it is a matter for the Legislature. “[I]t is simply one of the most basic understandings of the allocation of governmental powers among the three branches. The Legislature and the Executive do not decide cases — even though the Constitution does not say so; the judiciary does not pass laws.” Id. at 560, 608 A.2d 341.
The Appellate Division suggested one scheme for assessing the effect of prior Graves Act convictions on appeal. The Court has fashioned another. The Legislature itself may have another. The Attorney General informs us that the State has been able to live with the interpretation of State v. Mangrella, 214 N.J.Super. 437, 519 A.2d 926 (App.Div.1986), certif. denied, 107 N.J. 127, 526 A.2d 194 (1987), without seeking an amendment to the Code. The Model Penal Code, from which the extended-sentence structure of the Code of Criminal Justice is largely derived, State v. Dunbar, 108 N.J. 80, 86, 527 A.2d 1346 (1987), represents a carefully constructed scheme of habitual-offender sentencing. The Model *27Penal Code, which was ten years in the making, brought “thoughtfulness and rationality to a body of law that in many places sorely needed reform.” Joshua Dressier, Reflections on Excusing Wrongdoers: Moral Theory, New Excuses and the Model Penal Code, 19 Rutgers L.J. 671, 671, 716 (1988). We should not lightly alter its provisions.
II
The unusual circumstances of this case counsel against adding another complexity to the sentencing process. The first such-circumstance was the failure of the original sentencing judge to realize that the ease was not ripe for sentencing defendant as a second Graves Act offender. The law was clear under Mangrella, supra, 214 N.J.Super. at 445, 519 A.2d 926, that to impose a Graves Act extender the prior Graves Act conviction must no longer be on appeal. Law should be the product of reason, not chance. A loss of liberty should not depend on the chance of a lottery. Had the court or counsel been conscious of the law, defendant would not have received a Graves Act extender at his first sentencing. Absent that random circumstance he would not now receive a Graves Act extender. His legal sentence would have been affirmed. We cannot be proud of a sentencing process that depends on the existence of judicial error as the predicate to outcome.
Second, there is a logical inconsistency between the trial court’s approach to a regular Graves Act sentence for armed robbery and the extended Graves Act sentence. Though defendant was a career criminal with a history of escalating violence, the court, by imposing on remand the regular sentence, gave the presumptive sentence for a first-degree offense of armed robbery of fifteen years with a required stipulation of five years without possibility of parole. N.J.S.A. 2C:43-6e and 2C:44 — 1f(1)(b). Had the court sentenced at the top of the range, as it well could have in the absence of a plea bargain, the sentence could have been twenty years with a ten-year parole ineligibility period.
*28Third, when the court sentenced defendant to the Graves Act extender, it inexplicably selected a higher range than for a regular sentence. In Dunbar, supra, 108 N.J. at 91-92, 527 A.2d 1346, we explained that in imposing an extended term the sentencer does not count twice the predicates that form the basis for the extended term, but rather considers whether there is something about the offense itself that requires the already extended sentence to be at a higher range. In imposing its regular sentence the court seemed to be saying that there was nothing unusual about the offense, else why did it give the presumed sentence? In the regular sentence, the court imposed one-half of the maximum period of parole ineligibility that could have been imposed, but in the extended sentence it imposed approximately two-thirds. Paradoxically, the court’s statement of reasons for the two sentences is identical — word for word — except for the recital that the defendant was subjected to the Graves Act extender.
The point is simply that principled sentencing can accommodate a sentence for the type of offender who is before the court and the statutory requirements for a Graves Act extender — that the prior convictions be final — without creating a system of temporary sentencing. Defendant stood convicted of armed robberies before two courts. He had a long record of lawlessness. Even without the so-called temporary sentencing provisions invoked by this Court, the two trial courts could have imposed sentences “appropriate to the sentencing occasion.” Richardson v. Nickolopoulos, 110 N.J. 241, 255, 540 A.2d 1246 (1988). For the first Graves Act offense, an armed robbery, defendant could have received twenty years with ten years of parole ineligibility. For the second Graves Act offense, he could have received twenty years with ten years of parole ineligibility for combined consecutive sentences of forty years with twenty years of parole ineligibility. In addition, because the defendant had been guilty of many prior offenses after the age of eighteen, he could have been sentenced as a persistent offender if he were not eligible for a Graves Act extender. Pursuant to the provisions of N.J.S.A. 2C:43-7, he could have been sentenced on either offense (or perhaps both) to a term of life *29imprisonment with a maximum parole ineligibility term of twenty-five years. N.J.S.A. 2C:43-7a(2) and -7b. Two combined sentences could have kept defendant in prison for thirty-five years if principled sentencing so required. The fault for any lesser sentence lies not in the Code but in its administrators.
Ill
There is another reason why we ought not start temporary sentencing. Finality in sentencing is an end in itself. See State v. Ryan, 86 N.J. 1, 10, 429 A.2d 332, cert. denied, 454 U.S. 880, 102 S.Ct. 363, 70 L.Ed.2d 190 (1981). This case is idiosyncratic. If disposition of the matters in the Appellate Division had been ordered differently, defendant would have been resentenced to the ordinary term.
There is no need to change the law to accommodate the chronology of events in this case. I suspect that most second Graves Act offenders who commit crimes with guns have long criminal histories that make them eligible for extended terms anyway. Defendant should probably have been sentenced as a persistent offender. The prosecution did not, however, seek to have Haliski sentenced as a persistent offender. Instead, the trial court gave him a sentence that was not authorized by law. Haliski’s appeal did not wipe the slate clean as in State v. Rodriguez, 97 N.J. 263, 271, 478 A.2d 408 (1984) (“Since the underlying substantive convictions * * * were themselves the subject on an appeal in which defendant sought their modification, no legitimate expectation of finality could be invested in the underlying convictions or the sentences related to them.”). The policy of North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656 (1969), is that, ordinarily, subjecting an accused to the risk of harsher punishment as a condition of appealing a sentence imposed after trial violates principles of due process. That is, in effect, what happened here.
STEIN, J., joins in this opinion.