
280 Kan. 753 (2006)
STATE OF KANSAS, Appellant,
v.
JAMES C. WENDLER, Appellee.
No. 89,568.
Supreme Court of Kansas.
Opinion filed February 3, 2006.
Benjamin J. Fisher, assistant district attorney, argued the cause, and Thomas R. Stanton, deputy district attorney, and Phill Kline, attorney general, were with him on the brief for appellant.
Randall L. Hodgkinson, deputy appellate defender, argued the cause and was on the brief for appellee.
The opinion of the court was delivered by
BEIER, J.:
This appeal represents the next generation in what has become a long line of descendants from this court's identical offense ruling in State v. McAdam, 277 Kan. 136, 83 P.3d 161 (2004).
Defendant James C. Wendler entered a no contest plea to several drug-related offenses, including one count of manufacture of *754 methamphetamine, one count of attempted manufacture of methamphetamine, and two counts of possession of ephedrine or pseudoephedrine. The district judge sentenced him to 158 months' imprisonment on the manufacturing count, 140 months on the attempted manufacture count, and 146 months on each of the possession counts.
Based on the Court of Appeals' decision in State v. Frazier, 30 Kan. App. 2d 398, 42 P.3d 188, rev. denied 274 Kan. 1115 (2002), the district court resentenced Wendler to 11 months on each possession count. The State appealed, challenging Frazier, which held that possession of pseudoephedrine under K.S.A. 65-7006(a) and possession of paraphernalia under K.S.A. 65-4152(a)(3) could be identical crimes and that, when they are identical under the facts of a given case, a defendant convicted under K.S.A. 65-7006(a) can be sentenced only under the lesser penalty provision of K.S.A. 65-4152(a)(3). Frazier, 30 Kan. App. 2d at 404-06. Wendler did not cross-appeal.
While the State's Frazier appeal was pending, this court decided McAdam, 277 Kan. 136. In McAdam, we applied the identical offense doctrine to hold that a defendant convicted of a methamphetamine manufacturing offense under K.S.A. 65-4159 could be sentenced only under the lesser penalty provision applicable to convictions for a stimulant compounding offense under K.S.A. 65-4161. McAdam, 277 Kan. at 145-47.
After we issued the McAdam decision, Wendler filed a motion to correct an illegal sentence in the Court of Appeals, seeking downward adjustments of his manufacturing and attempted manufacture sentences. His counsel also filed a Rule 6.09(b) (2005 Kan. Ct. R. Annot. 44) letter with the Court of Appeals, seeking the same relief.
The Court of Appeals rejected the State's appeal and affirmed Wendler's resentencing under Frazier, but it did not address the McAdam issue raised by Wendler's motion and his counsel's letter. Wendler comes before us now on his petition for review, still seeking relief under the McAdam decision.
In State v. Barnes, 278 Kan. 121, 92 P.3d 578 (2004), a direct appeal, we remanded for resentencing under McAdam because the *755 direct appeal was still pending by the time McAdam was decided. Barnes, 278 Kan. at 129. There is no question that a direct appeal is still pending in this case as well, and McAdam has been decided. The only issue before us is whether it should make any difference that this appeal was taken originally by the State rather than by the defendant.
We first, of necessity, address jurisdiction. The right to appeal is purely statutory, and an appellate court has a duty to question jurisdiction on its own initiative. If the record indicates that jurisdiction does not exist, an appeal must be dismissed. State v. Verge, 272 Kan. 501, 521, 34 P.3d 449 (2001). The issue of appellate jurisdiction is one of law over which this court has unlimited, de novo review. State v. James, 276 Kan. 737, 744, 79 P.3d 169 (2003).
The State appealed from "the sentencing decision" of the trial court "pursuant to K.S.A. 22-3602(b)(3) and/or K.S.A. 21-4721." K.S.A. 2004 Supp. 22-3602(b) lists the limited types of appeals that may be taken by the prosecution from cases before a district judge. K.S.A. 2004 Supp. 22-3602(b)(3) reserves the prosecution's right to appeal "upon a question reserved." K.S.A. 2004 Supp. 22-3602(f) further provides that an appeal by the prosecution or the defendant relating to sentences imposed pursuant to a presumptive sentencing guidelines system as provided in K.S.A. 21-4701 et seq., shall be as provided in K.S.A. 21-4721. That statute, in subsection (e)(3), provides: "[I]n any appeal, the appellate court may review a claim that . . . the sentencing court erred in ranking the crime severity level of the current crime." K.S.A. 21-4721(e)(3).
These statutes properly conferred jurisdiction on the Court of Appeals for the State's appeal in this case. The State preserved its Frazier question for appeal by objecting to the district court's resentencing of Wendler.
Whether jurisdiction existed to entertain Wendler's later Motion to Correct an Illegal Sentence filed in the Court of Appeals requires additional discussion. Wendler's sentence was not "illegal." See Barnes, 278 Kan. at 123-24 (underlying sentence attacked under identical offense doctrine as applied in McAdam not "illegal"); see also United States v. Batchelder, 442 U.S. 114, 60 L. Ed. 2d 755, 99 S. Ct. 2198 (1979) (no constitutional right to lesser penalty *756 when two applicable statutes proscribe identical conduct). However, as noted above, this court may, in any appeal, entertain a claim that the sentencing court erred in ranking the crime severity level of the current crime. K.S.A. 21-4721(e)(3). This statute conferred jurisdiction on the Court of Appeals; although Wendler's motion was captioned "Motion to Correct an Illegal Sentence," its substantive claim was that the sentencing court erred in ranking the crime severity level of the manufacture and attempted manufacture offenses.
Furthermore, the Court of Appeals' failure to address the McAdam issue does not prevent this court from taking that issue up on petition for review, because it was properly raised before the Court of Appeals. See Supreme Court Rule 8.03(g)(1) (2005 Kan. Ct. R. Annot. 61); see also State v. Ross, No. 88,469, unpublished opinion filed June 25, 2004 (defendant raised sentencing issue in reply brief before Court of Appeals; Court of Appeals did not address issue in its opinion; issue nevertheless properly before both courts; case remanded for resentencing under McAdam). Wendler's counsel argued when he appeared before us that it would be a "neat trick" if the Court of Appeals could avoid review by this court merely by refusing to address an issue properly raised and within its jurisdiction. We doubt such a "neat trick" was intended by the Court of Appeals here, and, in any event, it would not deprive this court of jurisdiction to decide an otherwise cognizable claim.
On the merits, we see no reason why Wendler should not be resentenced on the manufacture and attempted manufacture counts under McAdam. When any party takes an appeal in any case, that party implicitly accepts the known risk that the law could change or evolve in a manner advantageous to the opponent before the appeal is finally adjudicated. Wendler's case remains on direct appeal at this time, and the McAdam decision has become part of the common law of Kansas that governs disposition of the matter.
The Court of Appeals and the district court are affirmed as to Frazier resentencing; sentences for manufacture of methamphetamine and attempted manufacture of methamphetamine are vacated *757 and the case is remanded for resentencing on those two counts in keeping with McAdam, 277 Kan. 136.
