
270 Kan. 603 (2001)
17 P.3d 344
STATE OF KANSAS, Appellee,
v.
JAMES A. MARTIN, Appellant.
No. 84,621.
Supreme Court of Kansas.
Opinion filed January 26, 2001.
Michael P. Whalen, of Law Office of Michael P. Whalen, of Wichita, argued the cause and was on the briefs for appellant.
Debra S. Peterson, assistant district attorney, argued the cause, and Nola Foulston, district attorney, and Carla J. Stovall, attorney general, were with her on the brief for appellee.
Timothy G. Madden, special assistant attorney general, argued the cause and was on the briefs for intervenor Kansas Department of Corrections.
The opinion of the court was delivered by
LOCKETT, J.:
This is a direct appeal of the district court's finding that K.S.A. 1998 Supp. 21-4603d(e) is unconstitutional and its order returning the defendant to the custody of the Department of Corrections (DOC). Three issues are raised: (1) Does K.S.A. 1998 Supp. 21-4603d(e) violate the separation of powers doctrine; (2) did the district court have jurisdiction to determine the constitutionality of K.S.A. 1998 Supp. 21-4603d(e); and (3) if the statute is determined to be unconstitutional, must the defendant remain in the custody of the DOC? The second issue is dispositive of the case, therefore, the remaining issues will not be addressed in this opinion.
On April 9, 1999, James Martin pled guilty to possession of marijuana with intent to sell and no tax stamp. Prior to sentencing, Martin applied for and received preliminary acceptance to the Labette Correctional Conservation Camp (Labette). A follow-up evaluation stated that Martin was actively participating in a relapse prevention program.
*604 On May 11, 1999, Martin appeared for sentencing. The district judge noted that Martin's primary offense was a severity level 3 on the drug sentencing grid. Martin's criminal history score was H. A classification of 3-H on the drug sentencing grid was a border box classification, authorizing the court to impose a nonprison sentence if (1) an appropriate treatment program exists which is likely to be more effective than the presumptive prison term in reducing the risk of recidivism; (2) the recommended treatment program is available and the offender can be admitted into the program within a reasonable period of time; or (3) the nonprison sanction will serve community safety interests by promoting offender reformation. See K.S.A. 1997 Supp. 21-4705(d).
Martin's attorney advised the judge that Martin had been accepted into the Labette program and Martin had taken steps toward reformation. Martin's counsel pointed out that Martin had been administered a drug and alcohol evaluation and had completed his initial treatment. Martin's counsel argued that Martin and society would be better served by Martin's placement in Labette pursuant to K.S.A. 21-4603d(e) as opposed to incarceration.
Due to the amount of marijuana involved (approximately 37 pounds), the district judge declined to sentence Martin to placement at Labette. The judge ordered Martin to serve a 26-month prison term.
After Martin was in the custody of the Kansas Department of Corrections (DOC), the DOC placed Martin in the Labette program pursuant to K.S.A. 21-4603d(e). In November 1999, the DOC sent a letter to the district judge stating that Martin would soon graduate from Labette and, in compliance with K.S.A. 21-4603d(e), the court was to order Martin released to community corrections.
On November 15, 1999, the district judge by letter informed the Sedgwick County District Attorney, the Kansas Attorney General's office, and Martin's attorney that a hearing would be held on December 8, 1999, to address the constitutional validity of K.S.A. 21-4603d(e) under the separation of powers doctrine. Martin's attorney filed a motion opposing the hearing, alleging the court had no jurisdiction to challenge the constitutionality of the statute and asserting *605 that even if the court had jurisdiction to challenge the statute, the time for its challenge had expired.
On December 8, 1999, the matter was heard. The judge noted that the court's opportunity to consider the issue arose when it received the October 1999 letter from the DOC addressing Martin's release. After arguments, the judge found that the portion of K.S.A. 1998 Supp. 21-4603d(e) which required the court to assign an inmate to community corrections following receipt of a letter from the Secretary of Corrections indicating an inmate had successfully completed a conservation camp was an unconstitutional violation of the separation of powers. The judge stated that the Secretary of Corrections cannot make a binding recommendation on the court. See State v. Reed, 248 Kan. 792, 811 P.2d 1163 (1991). The judge observed that if the DOC placed an inmate on parole, there would be no separation of powers problem. The judge concluded that the DOC cannot require the district court to place an inmate on probation. The judge declared K.S.A. 1998 Supp. 21-4603d(e) unconstitutional and refused to release Martin to community corrections. Martin appealed. Our jurisdiction is pursuant to K.S.A. 22-3602.

Constitutionality of K.S.A. 1998 Supp. 21-4603d(e)
The judge had jurisdiction to determine the constitutionality of K.S.A. 1998 Supp. 21-4603d(e) if that statute applied to Martin. It is important to note that Martin committed his crime in March 1998. Criminal statutes and penalties in effect at the time of the criminal act are controlling. State v. Sisk, 266 Kan. 41, 44, 966 P.2d 671 (1998). Therefore, K.S.A. 1997 Supp. 21-4603d applies to this case. In 1998, the legislature made minor changes to K.S.A. 1997 Supp. 21-4603d(e) which would have no effect on the outcome of this case. We note the 1998 legislative amendments did make substantive changes to other portions of the statute. See L. 1998, ch. 186, § 2..
K.S.A. 1997 Supp. 21-4603d(e) provides, in part:
"The secretary of corrections is authorized to make direct placement to the Labette correctional conservation camp of an inmate sentenced to the secretary's custody if the inmate: (1) Has been sentenced to the secretary for a probation revocation or as a departure from the presumptive nonimprisonment grid block *606 of either sentencing grid; and otherwise meets admission criteria of the camp. If the inmate successfully completes the 180-day conservation camp program, the secretary of corrections shall report such completion to the sentencing court and the county or district attorney. The inmate shall then be assigned by the court to 180 days of follow-up supervision conducted by the appropriate community corrections services program." (Emphasis added.)
K.S.A. 1997 Supp. 21-4705(d) provides that if an offense is classified in a border box, the sentence is presumed imprisonment, but the court may impose an optional nonprison sentence upon making the certain findings on the record. Subsection (d) provides that any decision made by the court to impose an optional nonprison sentence is not considered a departure or subject to appeal. The statute allows the district judge discretion to impose imprisonment or nonimprisonment to a defendant whose sentence falls within a border box. Under the statute, a sentence of imprisonment or probation within the respective ranges is not a departure. Cf. State v. Bost, 21 Kan. App.2d 560, 571, 903 P.2d 160 (1995) (sentence within range for border box of nondrug crime not a departure, applying K.S.A. 21-4704[a] and [f].
For Martin's primary crime of conviction, he was sentenced pursuant to the sentencing range in grid box 3-H of the drug sentencing grid, a border box, which provided the district court discretion to order imprisonment or nonimprisonment. Under the statutes in effect at the time of the imposition of Martin's sentence, the district court's imposition of imprisonment was not a departure. Therefore, Martin does not fall within the purview of K.S.A. 1998 Supp. 21-4603d(e). When the district court found K.S.A. 1998 Supp. 21-4603d(e) an unconstitutional violation of the separation of powers, the court erroneously assumed that Martin's sentence fell within the purview of K.S.A. 1998 Supp. 21-4603d(e). Neither K.S.A. 1997 Supp. 21-4603d(e) nor K.S.A. 1998 Supp. 21-4603d(e) were applicable to Martin.
In 1999, the legislature amended K.S.A. 1998 Supp. 21-4603d(e) to include persons such as Martin sentenced within border boxes in the class of individuals the Secretary of Corrections could directly place in Labette and after successful completion of that program transfer to the district court for placement in community *607 corrections. See L. 1999, ch. 164, § 13; K.S.A. 1999 Supp. 21-4603d(e). The DOC now asserts that statute is procedural and, therefore, retroactive and that Martin is subject to placement in community corrections.

RETROACTIVITY OF K.S.A. 1999 SUPP. 21-4603d(e)
The differences among the 1997, 1998, and the 1999 versions of K.S.A. 21-4603d are important to the issue. The record and the briefs indicate that the parties were not clear as to which version of the statute was applicable to Martin. The district court's order declaring K.S.A. 21-4603d(e) unconstitutional cites the 1998 version of the statute.
The DOC's correspondence with the district court refers to K.S.A. 21-4603d(e), without reference to the applicable statutory supplement, as authority for its request for an order placing Martin in community corrections. In the DOC's brief, the difference between the 1998 and 1999 versions of the statute is not acknowledged; however, the DOC's brief quotes the 1999 version as authority for its decision to assign Martin to Labette. In its reply brief, the DOC acknowledges the difference between the two statutes and admits that an argument regarding the applicability of the 1999 statute to Martin's case was not made to the district court. The DOC then argues to this court that the 1999 statute is applicable because that statute must be retroactively applied.
Martin's appellate brief cites and quotes K.S.A. 1998 Supp. 21-4603d(e) as the basis for his appeal. Martin does not acknowledge that the sentence he received does not fall within the 1998 statute. The State's brief notes the 1999 amendments to the statute and argues that because Martin's sentence did not fall within the purview of that statute, the DOC was not authorized to place Martin in Labette pursuant to K.S.A. 1998 Supp. 21-4603d(e). However, the State argues that both the 1998 and the 1999 versions of the statute are unconstitutional violations of separation of powers.
Martin's crimes were committed in March 1998, prior to the effective dates of K.S.A. 1998 Supp. 21-4603d and K.S.A. 1999 Supp. 21-4603d(e). The State argues against the position that the *608 1999 statute is retroactive. Both Martin's reply brief and the DOC's reply brief argued that the 1999 statute is retroactive.
The penalty for a criminal offense is the penalty provided by statute at the time of the commission of the offense. Kelsey v. State, 194 Kan. 668, 670, 400 P.2d 736 (1965). The prescription of a punishment for a criminal act is substantive, not procedural, law. State v. Hutchison, 228 Kan. 279, 287, 615 P.2d 138 (1980). Whether the 1999 statute was procedural and retroactive determines whether the constitutionality of the statute was properly before the district judge.
We faced a similar question in State v. Sylva, 248 Kan. 118, 804 P.2d 967 (1991). Stephan W. Sylva entered guilty pleas to one count of attempted sale of cocaine (K.S.A. 1987 Supp. 65-4107[b][5], K.S.A. 65-4127a, and K.S.A. 21-3301) and attempted sale of marijuana (K.S.A. 1987 Supp. 65-4105[d][13], K.S.A. 65-4127b[b][3], and K.S.A. 21-3301). He received sentences of 2 years to 5 years on each count, which were to be served concurrently. The offenses were class D felonies and the concurrent 2-to 5-year sentences did not constitute the minimum authorized sentences as neither offense was one specified in articles 34, 35, or 36 of chapter 21 of the Kansas Statutes Annotated. The lowest sentences which could have been imposed were 1 year to 5 years on each count. See K.S.A. 21-4501(d). The trial court denied the motion to modify Sylva's sentences.
Sylva appealed, contending that he was entitled to probation as a matter of law pursuant to statutes enacted after he was sentenced, K.S.A. 1989 Supp. 21-4603(3)(a) and K.S.A. 1989 Supp. 21-4606a. The Court of Appeals found that both statutes prescribed punishment and, thus, operated prospectively; therefore, Sylva was properly sentenced under the law as it existed at the time of the commission of the offenses. State v. Sylva, 14 Kan. App.2d 609, 612, 795 P.2d 947 (1990). The matter then came to this court on petition for review.
Our court in Sylva noted that Hutchison, 228 Kan. 279, set forth the applicable rules of statutory construction:
" The general rule of statutory construction is that a statute will operate prospectively unless its language clearly indicates that the legislature intended that it operate retrospectively.' Syl. ¶ 6.

*609 " The foregoing rule of statutory construction is modified where the statutory change is merely procedural or remedial in nature and does not prejudicially affect the substantive rights of the parties.' Syl. ¶ 7.
"`As related to criminal law and procedure, substantive law is that which declares what acts are crimes and prescribes the punishment therefor; whereas procedural law is that which provides or regulates the steps by which one who violates a criminal statute is punished.' Syl. ¶ 8." 248 Kan. at 119.
The Sylva court noted that the penalty for a criminal offense is the penalty provided by statute at the time of the commission of the offense. 248 Kan. at 119. It then applied the stated rules of construction to the two statutes enacted after Sylva had been sentenced.
The first statute reviewed, K.S.A. 1989 Supp. 21-4603(3)(a), provided that at any time within 120 days of sentencing the district court shall modify a sentence imposed if recommended by the State Reception and Diagnostic Center (SRDC) unless the court finds that the safety of the public will be jeopardized and that the welfare of the inmate will not be served by such modification. K.S.A. 1989 Supp. 21-4603 became effective July 1, 1989. The report filed by SRDC recommended Sylva be considered a candidate for probation.
Prior to the 1989 amendment, K.S.A. 21-4603(3) provided that the court may modify a sentence. As amended, the court was required to modify a sentence if recommended by the SRDC unless the court made the required findings. The Sylva court observed that the issue of retroactivity of the statute was controlled by State v. Sutherland, 248 Kan. 96, 106-08, 804 P.2d 970 (1991), which held that K.S.A. 1989 Supp. 21-4603(3)(a) made a substantive change in the law and was to be applied prospectively. Inasmuch as Sylva's crimes were committed in 1988, the subsequent statute did not apply. The Sylva court noted that even if the 1989 amendment had been applicable to Sylva, the trial court would not have been required to grant probation because the statute spoke in terms of modification by imposing a less severe penalty in lieu of that originally adjudged within statutory limits. 248 Kan. at 120.
The second statute at issue in Sylva, K.S.A. 1989 Supp. 21-4606a, also became effective on July 1, 1989, and provided:

*610 "The presumptive sentence for a person who has never before been convicted of a felony, but has now been convicted of a class D or E felony or convicted of an attempt to commit a class D felony shall be probation, unless the conviction is of a crime specified in article 34, 35 or 36 of chapter 21 of Kansas Statutes Annotated or the crime is a felony violation of K.S.A. 65-4127b, and amendments thereto, which involved the manufacture, sale, offer for sale or possession with intent to sell such controlled substances. In determining whether to impose the presumptive sentence, the court shall consider any prior record of the person's having been convicted or having been adjudicated to have committed, while a juvenile, an offense which would constitute a felony if committed by an adult. If the presumptive sentence provided by this section is not imposed, the provisions of K.S.A. 1989 Supp. 21-4606b shall apply." (Italics indicate 1989 amendments.)
In applying the rules of statutory construction previously stated, the Sylva court observed that it was clear that K.S.A. 1989 Supp. 21-4606a was substantive in nature because it concerned the penalty to be imposed for the offense to which it applied. Prospective application was, therefore, required. 248 Kan. at 120-21. The Sylva court observed that "our rule that the penalty parameters for an offense are fixed as of the date of the commission of the offense is fair, logical, and easy to apply. Neither the State nor a defendant may maneuver a sentencing date to take advantage of or avoid a change in a statute." 248 Kan. at 121. The Court of Appeals and the district court were affirmed.
The prescription for punishment at the time of Martin's criminal act was provided by K.S.A. 1997 Supp. 21-4603d and K.S.A. 1997 Supp. 21-4705(d). Under those statutes, Martin's imprisonment was not a departure. K.S.A. 1999 Supp. 21-4603d(e) prescribes the punishment for the criminal act; therefore, it is substantive and cannot be applied retroactively to Martin. The district court did not have the power to modify Martin's sentence and the issue of the constitutionality of K.S.A. 1998 Supp. 21-4603d(e) was not properly before the court. Martin is required to serve the sentence as imposed.
The district court's order declaring K.S.A. 1997 Supp. 21-4603d(e) unconstitutional is reversed.
