delivered the opinion of the court;
Defendant appeals from a judgment of the circuit court of Randolph County entered upon a jury verdict finding him guilty of unlawful possession of a controlled substance. Defendant was confined to the Menard Correctional Center on January 13, 1978, when Nelson Biesner and another guard at that facility engaged in a “random shakedown” of the segregation gallery where defendant was staying for his own protective custody. In the back of defendant’s cell was a laundry bag. A search of the contents revealed two pairs of socks containing 280 pills. The pills were analyzed at the DeSoto Crime Laboratory and some were found to contain the controlled substances diazepam and oxazepam. An information was filed in two counts, one for each of the two aforesaid drugs. A guilty verdict was returned by the jury on both' counts and a five-year sentence was ordered to ran consecutively to those defendant was then serving. Defendant contends that (1) improper and irrelevant testimony was presented by the State and erroneously admitted by the trial court, (2) the State’s Attorney engaged in prejudicial closing argument, and (3) the trial court abused its discretion in imposing the maximum sentence of imprisonment. However, we believe a matter not raised by appellant but addressed by the State is dispositive of this case. Accordingly, we reverse.
Appellant was convicted under section 402(b) of the Illinois Controlled Substances Act (Ill. Rev. Stat. 1977, ch. 56½, par. 1402(b)) for possession of a controlled substance. This statute was first held unconstitutional as violative of the equal protection clauses of the United States and Illinois constitutions in People v. Natoli (1979), 70 Ill. App.- 3d 131, 387 N.E.Bd 1083. This court later adopted the holding of Nafoll in the case of People v. Kimmons (1979), 79 Ill. App. 3d 601, on the ground that the sentences imposed for possession were clearly matters of legislative oversight which we as an appellate court could not correct by judicial fiat. *150A special concurring opinion in Kimmons additionally noted that the possession statute violated the equal protection clause of the fourteenth amendment of the United States Constitution because there was no rational basis for the legislature to mandate a less severe sentence for those convicted of delivery of a controlled substance than for those convicted of the lesser-included offense of possession. However, appellant did not present this equal protection argument in his brief before this court, and the State in its brief argues that, therefore, this contention is waived under Supreme Court Rule 341(e)(7) (Ill. Rev. Stat. 1977, ch. 110A, par. 341(e)(7)). We disagree.
Supreme Court Rule 615(a) (Ill. Rev. Stat. 1977, ch. 110A, par. 615(a)) provides as follows:
“(a) Insubstantial and Substantial Errors on Appeal. Any error, defect, irregularity, or variance which does not affect substantial rights shall be disregarded. Plain errors or defects affecting substantial rights may be noticed although they were not brought to the attention of the trial court.”
This rule has been interpreted to mean that a reviewing court may, as a matter of grace, take notice of errors which deprived the accused of or affected substantial rights but which have not been properly preserved for appeal. (People v. Roberts (1979), 75 Ill. 2d 1, 14, 387 N.E.2d 331; People v. Pickett (1973), 54 Ill. 2d 280, 282-83, 296 N.E.2d 856; People v. Harrawood (1978), 66 Ill. App. 3d 163, 167, 383 N.E.2d 707.) We choose to exercise that discretion here, for while constitutional as well as other questions are encompassed within the waiver rule (People v. Pickett (1973), 54 Ill. 2d 280, 282), we can conceive of nothing more shocking to one’s substantial rights than to be tried and convicted under a statute which has been declared unconstitutional. Such an outrageous procedure denigrates the constitutional right of due process, for even if the accused was accorded a fair and impartial trial, he should not have been tried in the first place. People v. Burson (1957), 11 Ill. 2d 360, 370-71, 143 N.E.2d 239.
For the reasons stated in People v. Natoli and People v. Kimmons, we hold section 402(b) of the Illinois Controlled Substances Act (Ill. Rev. Stat. 1977, ch. 56½, par. 1402(b)) unconstitutional and appellant’s conviction thereunder void. Based on the foregoing, we need not address appellant’s assignments of error. Accordingly, the judgment of the circuit court of Randolph County is reversed.