
254 Kan. 16 (1993)
864 P.2d 1208
STATE OF KANSAS, Appellee,
v.
RONALD SMITH, Appellant.
No. 67,855
Supreme Court of Kansas.
Opinion filed December 10, 1993.
Chris Biggs, county attorney, argued the cause, and Robert T. Stephan, attorney general, was with him on the briefs for appellee.
Jean K. Gilles Phillips, assistant appellate defender, argued the cause, and Jessica R. Kunen, chief appellate defender, was with her on the brief for appellant.
The opinion of the court was delivered by
McFARLAND, J.:
Ronald Smith appeals from the trial court's determination that it lacked jurisdiction to hear his second motion to modify the sentences imposed. The Court of Appeals affirmed the trial court's dismissal of the motion to modify (State v. Smith, 17 Kan. App.2d 746, 843 P.2d 297 [1992]). The matter is before us on petition for review.
The sole issue presented concerns the extent of the grant of jurisdiction afforded by K.S.A. 1992 Supp. 21-4603(4) to a trial court to modify a sentence. The statute provides:
"(a) Except when an appeal is taken and determined adversely to the defendant as provided in subsection (4)(b), at any time within 120 days after a sentence is imposed, after probation or assignment to a community correctional services program has been revoked, the court may modify such sentence, revocation of probation or assignment to a community correctional services program by directing that a less severe penalty be imposed in lieu of that originally adjudged within statutory limits and shall modify such sentence if recommended by the Topeka correctional facility unless the court *17 finds and sets forth with particularity the reasons for finding that the safety of members of the public will be jeopardized or that the welfare of the inmate will not be served by such modification.
"(b) If an appeal is taken and determined adversely to the defendant, such sentence may be modified within 120 days after the receipt by the clerk of the district court of the mandate from the supreme court or court of appeals."
The pertinent chronology of events is as follows:


  April 23, 1990      Defendant enters his plea of nolo contendere to one
                      count each of rape, aggravated criminal sodomy, and
                      aggravated burglary.
  May 21, 1990        Defendant is sentenced to a controlling term of 20 to
                      40 years imprisonment.
  May 23, 1990        First motion to modify the sentence is filed.
  August 20, 1990     Motion to modify is heard and denied.
  August 21, 1990     Appeal from the denial of the motion to modify is filed.
  June 14, 1991       Court of Appeals affirms the trial court's denial of the
                      first motion to modify (unpublished opinion, No.
                      65,813).
  July 15, 1991       Petition for review is filed.
  September 18, 1991  Second motion to modify is filed.
  November 6, 1991    1. Petition for review is denied.
                      2. Mandate is issued.
  December 12, 1991   Trial court grants the State's motion to dismiss the
                      second motion to modify for lack of jurisdiction.
  December 30, 1991   Notice of appeal is filed from the dismissal of the
                      second motion to modify.
  December 18, 1992   Court of Appeals opinion is filed affirming the trial
                      court's denial of the second motion to modify for lack
                      of jurisdiction.

K.S.A. 1992 Supp. 21-4603 is a lengthy statute dealing generally with what dispositions are authorized in criminal cases. Toward the end of the statute are the provisions at issue granting *18 jurisdiction to a trial court to modify the disposition within certain time frames and under certain conditions. It is helpful to think of these provisions as establishing windows of jurisdiction.
The defendant contends the 120-day window under 21-4603(4)(b) opens anytime a mandate issues from an appellate court regardless of what judgment or order was the subject of the appeal. Thus, whether a mandate issues from a direct appeal from a conviction or from an appeal from the denial of any post-trial motion, under defendant's position, the window opens for a 120-day period. We do not agree.
At this point a discussion of State v. Reed, 253 Kan. 154, 853 P.2d 50 (1993), is appropriate. Reed entered a plea of nolo contendere to first-degree murder and was sentenced thereon. He subsequently filed a motion to modify his sentence, and said motion was denied. Later, he filed a motion to withdraw his plea. This motion was denied, and Reed appealed from the denial of this motion. This court affirmed the trial court's refusal to permit Reed to withdraw his plea (State v. Reed, 248 Kan. 506, 809 P.2d 553 [1991]). After receipt of the mandate, Reed filed a second motion to modify his sentence, which was denied. The State challenged the trial court's jurisdiction to hear the second motion. We affirmed the trial court's determination that it had jurisdiction to determine the second motion to modify.
Much of the second Reed opinion is devoted to whether the current version of 21-4603(4) should apply or whether the pre-1988 version was applicable. The pre-1988 version was K.S.A. 1985 Supp. 21-4603(3), which provided:
"Any time within 120 days after a sentence is imposed or within 120 days after probation has been revoked, the court may modify such sentence or revocation of probation by directing that a less severe penalty be imposed in lieu of that originally adjudged within statutory limits. If an appeal is taken and determined adversely to the defendant, such sentence may be modified within 120 days after the receipt by the clerk of the district court of the mandate from the supreme court or the court of appeals."
The changes between the two versions consist primarily of splitting the two 120-day provisions into separate paragraphs and adding the "Except" clause at the beginning of subsection (a). We concluded the pre-1988 version applied as Reed committed the offense in 1986 and was sentenced in 1987.
*19 We further concluded that, under the pre-1988 version of 21-4603:
"[T]he defendant who appeals can file a motion to modify 120 days from sentencing and, if the appeal is determined adversely, 120 days from receipt of the mandate. We conclude that the district court had jurisdiction to consider Reed's motion to modify sentence following receipt of the mandate even though the court had denied his pre-appeal motion to modify filed within 120 days of sentencing." 253 Kan. at 162.
There is one very significant factual distinction between Reed and the case before us. Whereas the conviction in each case was on a plea of nolo contendere and each defendant filed an unsuccessful motion to modify within 120 days after his sentence was imposed, the first appeal in Reed was not from the denial of the motion to modify but was from the denial of his motion to withdraw his plea. In his first appeal, Reed was therefore attacking the conviction itself. For our purposes, it was the equivalent of a direct appeal of the conviction. Reed did not appeal from the denial of his first motion to modify.
In the case before us, defendant's first appeal was not a direct appeal of his conviction, but was an appeal from the denial of his first motion to modify. Defendant is attempting to use the mandate affirming the denial of his first motion to modify to open the jurisdictional window under 21-4603(4)(b) for the filing of a second motion to modify. By this rationale, an unlimited number of motions to modify could be filed as long as each successive motion is filed within the 120-day window after receipt of the mandate affirming the trial court's denial of a defendant's most recently filed motion to modify sentence. We believe such a result would be contrary to K.S.A. 1992 Supp. 21-4603(4).
We conclude the "[e]xcept when an appeal is taken and determined adversely to the defendant as provided in subsection (4)(b)" language in (4)(a) means a direct appeal from the conviction. When there is no such appeal, the window granting a trial court jurisdiction to modify the disposition within 120 days after its imposition closes, and, thereafter, the trial court has no jurisdiction to modify the sentence. Exceptions would only exist as to an illegal sentence, which may be corrected at any time (K.S.A. 22-3504[1]), and a statutorily required reconsideration where modification is recommended by the Topeka Correctional Facility.
*20 The jurisdictional window under 21-4603(4)(b) only opens upon receipt of a mandate on a direct appeal from the conviction which has been decided adversely to the defendant. Thus, as herein, where there is no direct appeal from the conviction and neither of the aforementioned exceptions are present, the trial court has no jurisdiction to hear a motion to modify filed after the expiration of 120 days from the imposition of the original sentence.
This is a logical construction of the statute. The legislature has granted specific limited jurisdiction to trial courts to modify a disposition in a criminal case. Where there is no legal challenge to the conviction itself, a trial court has, under 21-4603(4)(a), jurisdiction for 120 days to modify the disposition. A defendant may seek sentence modification within that time frame. A defendant appealing his or her conviction is obviously challenging the conviction itself. If successful, there is no need for a defendant to seek modification of the sentence. If the challenge to the conviction is unsuccessful, the legislature grants the trial court jurisdiction for 120 days after receipt of the mandate to modify the sentence imposed on the conviction which has been affirmed. A defendant may, thereby, seek modification of a sentence after the conviction has been affirmed in the appellate process within the statutory time limits.
The judgment of the Court of Appeals is affirmed. The judgment of the district court is affirmed.
ABBOTT, J., dissenting:
This case will be of no significance in the future, but it is of great significance to those persons to whom it applies.
Historically, and for all crimes committed before July 1, 1993, a defendant had 10 days to appeal after the district court's power to modify the sentence expired. K.S.A. 22-3608. The trial court had 120 days after a sentence had been imposed or after probation or assignment to a community correctional services program had been revoked to modify the penalty. K.S.A. 1992 Supp. 21-4603(4).
With sentencing guidelines in effect, the purpose of the 120-day modification period is eliminated so any person convicted of committing a crime on or after July 1, 1993, has 10 days after the judgment of the district court to appeal. Thus, for crimes *21 committed on or after July 1, 1993, the trial court will no longer have 120 days to modify the punishment imposed.
As I read the opinion, the majority is saying the pre-1988 version of 21-4603(4) and the current version are construed the same. I am in complete agreement that the legislature did not intend to change the procedure it enacted by trying to improve the statutory language in the current version.
The majority, in my opinion, is legislating in an effort to prevent a perceived problem that does not exist. The statute in question was adopted in 1969. I have been a member of one or the other of Kansas' two appellate courts since 1977. From 1969 to 1977, the Supreme Court heard approximately 3,000 appeals. I am unable to locate any case during that period where this issue surfaced. Since 1977, the two appellate courts have heard over 20,000 appeals; this is only the third case I recall in which this issue was directly or indirectly involved and one of those cases was not published.
The purpose of 21-4603(4) is to give the trial judge wide latitude in modifying sentences. It has an effect of lessening the number of appeals  not increasing them. It gives the trial judge an opportunity to give a convicted person a "taste" of prison. The legislature also obviously wanted the Topeka Correctional Facility to have input in the sentence. Frequently, the trial court called a defendant back from prison and placed him or her on probation prior to the appeal time running. The legislature then allowed the defendant to appeal the sentence imposed.
The legislature next, in my opinion, allowed a defendant to file a second motion to modify within 120 days after receipt by the clerk of the district court of the mandate from the appellate court. This allows the trial judge a second look after the defendant has spent more time in prison and after the trial judge has had time to reflect on what a fair, impartial, and dispassionate sentence should be.
The majority points to no language in the statute to justify a different result than that reached in State v. Reed, 248 Kan. 506, 809 P.2d 553 (1991). Instead, it forces a defendant to make a choice that was never intended by the legislature and which is contrary to our existing law. A defendant has always received the benefit of the doubt, and a statute is normally construed most *22 favorably to an accused. State v. Frazier, 248 Kan. 963, 971, 811 P.2d 1240 (1991).
We have always required a defendant to include all known grounds for appeal or lose the right to have that issue considered on appeal. Now we are telling a defendant that he or she may file a motion to modify, have it heard and denied, and then appeal, and so long as he or she appeals only the conviction and does not appeal the trial court's refusal to modify, he or she has the statutory right to request the modification a second time within 120 days after receipt of the mandate by the clerk of the district court. But, if he or she includes the denial of the motion to modify in the first appeal, he or she cannot again file a motion to modify the sentence.
I have no concern of successive appeals. The doctrine of res judicata would take care of that problem. My concern is this court legislating jurisdiction granted by the legislature to the trial court to take a second, more detached, look at modifying a sentence. Permitting the trial court to take a second look at modifying a defendant's sentence is clearly authorized by the legislature.
I would reverse the trial court and the Court of Appeals and would hold the trial court had jurisdiction to hear the motion to modify. The language of the statute is clear and unambiguous. The 1988 amendment to 21-4603 makes clear that the statute provides for both a pre-appeal and a post-appeal motion to modify sentence when the appeal is determined adversely to the defendant. The 1988 amendment clarifies that position by setting aside in a new subparagraph the right to a post-appeal motion to modify sentence if the appeal was decided adversely to the defendant. The identical language in the version before the amendment reinforces that view. The "except" language in subsection (4)(a) of the 1988 amendment applies to a motion to modify sentence within 120 days of sentencing, while subsection (4)(b) clearly states the legislative intent to provide for a post-appeal motion to modify sentence, to move "for at least a more lenient sentence" as noted in State v. Saft, 244 Kan. 517, 521, 769 P.2d 675 (1989).
