
713 N.E.2d 1228 (1999)
306 Ill. App.3d 273
239 Ill.Dec. 378
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Paul Lee STENCIL, Defendant-Appellant.
No. 4-97-0686.
Appellate Court of Illinois, Fourth District.
July 1, 1999.
Rehearing Denied August 11, 1999.
*1229 Charles M. Schiedel, Deputy Defender, and Lawrence Bapst (Court-appointed), Office of the State Appellate Defender, Springfield, for Paul Lee Stencil.
William G. Workman, State's Attorney, Lincoln, Norbert J. Goetten, Director, Robert J. Biderman, Deputy Director, Jeffrey K. Davison, Staff Attorney, State's Attorneys Appellate Prosecutor, Springfield, for the People.
Presiding Justice KNECHT delivered the opinion of the court:
On June 21, 1993, defendant, Paul Lee Stencil, pleaded guilty to burglary, a Class 2 felony, and to possession of burglary tools, violations of sections 19-1(a) and 19-2 of the Criminal Code of 1961 (Criminal Code). 720 ILCS 5/19-1(a), 19-2 (West 1992). The trial court sentenced him to 22 years' imprisonment for the burglary offense and a concurrent 3-year term for possession of burglary tools. On September 24, 1993, defendant pleaded guilty to escape, a Class 2 felony, and to aggravated battery in violation of sections 31-6(a) and 12-4(a) of the Criminal Code. 720 ILCS 5/31-6(a), 12-4(a) (West 1992). Defendant was sentenced to concurrent terms of 23 years' imprisonment for escape and 10 years (later reduced to 5) for aggravated battery, to be served consecutively to the prior sentences. This court affirmed his convictions and sentences. People v. Stencil, 286 Ill.App.3d 1147, 237 Ill.Dec. 552, 709 N.E.2d 1021 (1997) (unpublished order under Supreme Court Rule 23). The only issue on direct appeal was the excessive length of the sentences.
On July 14, 1997, defendant filed a pro se postconviction petition under the Post-Conviction *1230 Hearing Act (Act). 725 ILCS 5/122-1 et seq. (West 1996). Defendant alleged he received ineffective assistance of appellate counsel on direct appeal when counsel failed to argue (1) the judge erred in permitting the indictment to be amended, which allowed defendant to be sentenced as a Class X offender; (2) a defect in an indictment; and (3) the trial court's inadequate admonition at defendant's pleas of guilty.
In an order dated July 18, 1997, the trial court dismissed the petition as frivolous or patently without merit under section 122-2.1(a)(2) of the Act (725 ILCS 5/122-2.1(a)(2) (West 1996)), specifically stating the doctrine of waiver applied to defendant's claims of ineffective assistance of appellate counsel and defendant's claims failed to meet the test set forth in Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984), for claims of ineffective assistance of counsel.
On July 25, 1997, defendant filed a motion to reconsider the trial court's dismissal of his postconviction petition. In this motion, defendant raised the issues upon which he appeals here: he was denied effective assistance of appellate counsel because counsel failed to raise on direct appeal the issue that defendant's aggregate sentence of 45 years exceeded the maximum allowable aggregated sentence under section 5-8-4(c) of the Unified Code of Corrections (Code). 730 ILCS 5/5-8-4(c) (West 1996). On July 25, the trial court denied defendant's motion to reconsider by docket entry without specifying any reason for the denial. Timely notice of appeal was filed August 7.
Defendant contends his claim the sentences exceeded the allowable aggregate was sufficient to state the "gist of a claim for relief which is meritorious" under the Act (People v. Dredge, 148 Ill.App.3d 911, 913, 102 Ill.Dec. 552, 500 N.E.2d 445, 446 (1986)), and his petition should not have been dismissed. We disagree.
First, we note defendant's claims are not waived. Where an alleged waiver stems from ineffectiveness of appellate counsel, the strict application of the doctrine of waiver will be relaxed. People v. Barnard, 104 Ill.2d 218, 229, 83 Ill.Dec. 585, 470 N.E.2d 1005, 1008 (1984).
The standard of review of whether a postconviction petition is frivolous is whether the allegations, construed liberally in favor of the pro se petitioner, together with supporting documents, court records, and transcripts, contain the gist of a meritorious claim. People v. Porter, 122 Ill.2d 64, 74, 118 Ill.Dec. 465, 521 N.E.2d 1158, 1161 (1988); People v. Lemons, 242 Ill.App.3d 941, 944-46, 184 Ill.Dec. 642, 613 N.E.2d 1234, 1236-37 (1993).
To sustain a claim for ineffective assistance of counsel, the two-part test enunciated in Strickland is used in reviewing the performance of both trial and appellate counsel. People v. Hayes, 279 Ill.App.3d 575, 580-81, 216 Ill.Dec. 359, 665 N.E.2d 419, 423 (1996). To establish ineffective assistance of appellate counsel, defendant must show the failure to raise an issue was objectively unreasonable and, but for this failure, his sentence or conviction would have been reversed. People v. Flores, 153 Ill.2d 264, 283, 180 Ill.Dec. 1, 606 N.E.2d 1078, 1087 (1992). In this case, defendant argues he received ineffective assistance of counsel because his aggregate sentences exceeded the maximum allowed by statute and counsel failed to raise this issue on appeal. To prevail in this argument, defendant needs to show it was unreasonable for counsel not to raise this issue and his sentence would have been reduced if the issue had been raised.
In support of his argument that he received ineffective assistance of appellate counsel, defendant cites section 5-8-4(c)(2) of the Code, which provides in relevant part:
"[T]he aggregate of consecutive sentences shall not exceed the sum of the maximum terms authorized under Section 5-8-2 [(730 ILCS 5/5-8-2 (West 1992))] for the 2 most serious felonies involved." 730 ILCS 5/5-8-4(c)(2) (West 1992).
Section 5-8-2(a)(4) of the Code provides that an extended term for Class 2 felonies is 14 years' imprisonment. 730 ILCS 5/5-8-2(a)(4) (West 1992).
Both burglary and escape are Class 2 felonies. Therefore, defendant contends his combined sentences cannot exceed 28 years. *1231 Accordingly, he argues the 22-year burglary sentence should stand, but the sentence of 23 years for escape should be vacated and the case remanded for sentencing within the 28-year combined limit.
Defendant received sentences exceeding the 14-year extended-sentence limits for Class 2 felonies because he had previous convictions for Class 2 or greater felonies. Under section 5-5-3(c)(8) of the Code, any defendant over the age of 21 who:
"is convicted of a Class 1 or Class 2 felony, after having twice been convicted of any Class 2 or greater Class felonies in Illinois, and such charges are separately brought and tried and arise out of different series of acts, such defendant shall be sentenced as a Class X offender." 730 ILCS 5/5-5-3(c)(8) (West 1992).
The Class X sentencing provisions of section 5-5-3(c)(8) are mandatory for those eligible. People v. Thomas, 171 Ill.2d 207, 221-22, 215 Ill.Dec. 679, 664 N.E.2d 76, 84 (1996). Sentences for Class X offenders are to be not less than 6 years and not more than 30 years. 730 ILCS 5/5-8-1(a)(3) (West 1992).
The State argues defendant is using an inappropriate figure, 14 years plus 14 years maximum, in computing the aggregate sentences allowed. The State contends defendant was correctly sentenced as a Class X offender under section 5-5-3(c)(8), which is mandatory where a defendant has two or more previous Class 2 or higher convictions, so an aggregate of 30 years plus 30 years maximum is the applicable figure. Under this reasoning defendant's aggregate sentence of 45 years is allowable.
However, our supreme court has stated while section 5-5-3(c)(8) increases a defendant's sentence because of his prior felony convictions, the classification of the offense for which the defendant is then being sentenced remains the same as that originally charged. Thomas, 171 Ill.2d at 224, 215 Ill.Dec. 679, 664 N.E.2d at 85; People v. Jameson, 162 Ill.2d 282, 290, 205 Ill.Dec. 90, 642 N.E.2d 1207, 1211 (1994). Thus, section 5-5-3(c)(8) does not operate to create Class X felonies out of lesser offenses but only serves to enhance the punishment for those crimes.
Recently, the First District Appellate Court in People v. Ritchey, 286 Ill.App.3d 848, 222 Ill.Dec. 439, 677 N.E.2d 973 (1997), when faced with a similar factual situation to that here, cited Thomas and found the two Class 2 felonies involved in Ritchey (robbery and escape) retained their status despite Class X sentencing and, therefore, the two consecutive Class X sentences under the aggregate-sentence restriction of section 5-8-4(c)(2) could not exceed 14 years allocated to Class 2 felonies under section 5-8-2(a)(4). Ritchey, 286 Ill.App.3d at 851, 222 Ill.Dec. 439, 677 N.E.2d at 975.
The State contends Ritchey was wrongly decided, as the aggregate-sentence restriction imposed by section 5-8-4(c)(2) is not intended to apply in the case of mandatory consecutive sentences such as that here. It notes the limitations of section 5-8-4(c) immediately follow the discretionary consecutive sentencing provisions of section 5-8-4(b), and it was such sentences the legislature was intending to limit. Mandatory consecutive sentences are addressed in later subsections of the statute, specifically sections 5-8-4(f), (g), (h), and (i).
The State also notes our supreme court's decision in People v. Tucker, 167 Ill.2d 431, 212 Ill.Dec. 664, 657 N.E.2d 1009 (1995), where the court held a defendant sentenced to consecutive prison terms under section 5-8-4(b), providing for discretionary consecutive terms to protect the public from further criminal conduct by a defendant, may not be sentenced to consecutive sentences exceeding the sum of the maximum extended terms authorized for the two most serious offenses as provided by section 5-8-4(c)(2). Tucker, 167 Ill.2d at 438-39, 212 Ill.Dec. 664, 657 N.E.2d at 1013.
The State in Tucker asked the court to consider the impact of its ruling on other, mandatory consecutive sentence provisions, such as the one in this case, section 5-8-4(h), relating to felonies committed while on pretrial release or in pretrial detention. The court stated:
"Application of the consecutive sentencing limitation contained in section 5-8-4(c)(2) to the mandatory consecutive sentences *1232 that may be imposed under sections 5-8-4(f) through (i) raises a separate and distinct issue of statutory construction not raised by the facts of this case. Therefore, we will not address this issue." Tucker, 167 Ill.2d at 438, 212 Ill.Dec. 664, 657 N.E.2d at 1013.
The State contends the court in Ritchey failed to consider the ramifications of its decision on the mandatory consecutive sentencing provisions of section 5-8-4. Defendant, under the mandatory provisions of section 5-5-3(c)(8), was eligible for a sentence of up to 60 years' imprisonment. See 730 ILCS 5/5-8-2(a)(2) (West 1992). If the trial court had sentenced defendant to 60 years on his first sentence for burglary, the 14-year plus 14-year aggregate requirements of section 5-8-4(c)(2) under the Ritchey decision would have required the court to actually reduce his aggregate sentence to come in under the 28-year aggregate-sentence cap. The result would then be not only an avoidance of punishment for escape but the reward of a reduction in sentence to fit under the aggregate-sentence restriction.
The State argues such an absurd result could not have been intended by the legislature. In interpreting a statute, the primary rule of statutory construction is to ascertain and give effect to the legislature's intent. State Farm Fire & Casualty Co. v. Yapejian, 152 Ill.2d 533, 540-41, 178 Ill.Dec. 745, 605 N.E.2d 539, 542 (1992). That inquiry begins with the plain meaning of the language used by the legislature. Nottage v. Jeka, 172 Ill.2d 386, 392, 217 Ill.Dec. 298, 667 N.E.2d 91, 93 (1996). In determining legislative intent, a court may consider the reason and necessity for the law, the evils to be remedied, and the objects to be attained. Tucker, 167 Ill.2d at 436, 212 Ill.Dec. 664, 657 N.E.2d at 1012. In addition, in construing the language of a statute, the court will assume the legislature did not intend to produce an absurd or unjust result. State Farm, 152 Ill.2d at 541, 178 Ill.Dec. 745, 605 N.E.2d at 542.
The legislature obviously felt the end-run around the legal system attempted by a pretrial escapee merited the severe punishment of a mandatory consecutive sentence and, therefore, left no discretion to the sentencing court. See 730 ILCS 5/5-8-4(h) (West 1992). In addition, the legislature clearly intended to require the enhancement of the punishment of certain repeat offenders as evidenced by its use of the word "shall" when requiring Class X sentencing under section 5-5-3(c)(8). See Thomas, 171 Ill.2d at 222, 215 Ill.Dec. 679, 664 N.E.2d at 84.
As for section 5-8-4(c)(2), the apparent purpose of the legislature was to limit the total length of consecutive sentences imposed on a given defendant, while still fairly punishing him in relation to the severity of the crimes. Tucker, 167 Ill.2d at 436, 212 Ill. Dec. 664, 657 N.E.2d at 1012. We agree with the reasoning of the court in Tucker, which went on to say such a purpose is reasonable in the context of punishing an offender for a series of crimes where the stacking of penalties can result in sentences of extraordinary harshness. Tucker, 167 Ill.2d at 436, 212 Ill.Dec. 664, 657 N.E.2d at 1012.
However, the intersection of the provision for a mandatory consecutive sentence for the separate offense of escape found in section 5-8-4(h) and the aggregate-consecutive-sentence restriction found in section 5-8-4(c)(2), with the mandatory Class X sentencing provisions required for repeat offenders in section 5-5-3(c)(8) results in the scenario postulated by the State. The absurd result of allowing a defendant who commits an escape not only to escape punishment for that offense but to gain a sentence reduction for his first-sentenced offense to remain under the aggregate-sentencing restrictions was obviously not intended by the legislature. In interpreting these statutes together, we will do so in a way that avoids an absurd result. Therefore, we decline to follow the holding in Ritchey and find defendant's consecutive sentences in the Class X sentencing range are the punishments he deserves for committing burglary with his many prior convictions and escape while awaiting trial.
In disagreeing with Ritchey, we realize our decision arguably conflicts with the words of the statute. We invite the legislature and our supreme court to clarify the sentencing *1233 provisions that have conjoined in at least two cases to date.
Defendant would not have prevailed on the issue of his aggregate sentences exceeding the maximum allowed under section 5-8-4(c)(2); thus, he cannot satisfy the two-part Strickland test of showing (1) it was unreasonable for counsel not to raise this issue and (2) his sentence would have been reduced if the issue had been raised.
The trial court did not err in dismissing his pro se postconviction petition.
Affirmed.
STEIGMANN and McCULLOUGH, JJ., concur.
