delivered the opinion of the court:
The defendant, William K. Anderson, was convicted of the offense of pandering following a jury trial in Peoria County. He was sentenced to a determinate term of 18 months imprisonment.
Defendant was convicted of pandering in that he arranged a situation between January 2, 1977, and May 24, 1977, for money in which one Violet Lee Greathouse might practice prostitution. No useful purpose can be served by detailing the specific facts involved in the commission of the crime for which the defendant was convicted. On appeal he has raised two issues:
1. Whether the trial court abused its discretion in denying defendant’s motion for a continuance where the State produced, on the day of trial, a written statement made by the State’s chief witness containing names of potential witnesses not previously mentioned in discovery.
2. Whether the defendant was denied due process and equal protection of law and his statutory right to election where the trial court did not permit him to make a meaningful choice between the old and new sentencing acts by electing between specific alternatives.
By an agreed statement of facts pursuant to Supreme Court Rule 323(d) (Ill. Rev. Stat. 1977, ch. 110A, par. 323(d)) it was agreed that the Peoria County State’s Attorney’s office generally complied with the discovery rules applicable in criminal cases even in the absence of a written motion made by the defendant. It is also undisputed that on the day of trial the prosecutor informed the court and defense counsel that the police department had in their possession two written statements not previously furnished to the defense in discovery. One statement was that of Linda Miles, who had been listed as a possible witness against defendant, and the other statement was that of Violet Lee Greathouse, the prosecution’s chief witness against the defendant.
After the two statements were given to the defense in open court and examined by defense counsel, a continuance was requested by defendant. In arguing his motion for a continuance the defendant recited that the statement of Violet Lee Greathouse contended that various women were working as prostitutes for the defendant and that the names of three women heretofore unmentioned appeared for the first time in her statement. He claimed he needed a continuance on the day of trial for the reason that he wanted the opportunity to locate the three newly mentioned women to find out if they could testify in his defense, to determine if they possessed information that might lead to other witnesses and evidence, and to determine whether the three women might have information which would impeach Violet Lee Greathouse or generally exculpate the defendant. In arguing against the defendant’s motion for a continuance, the prosecutor claimed that the three women who were named by Greathouse in her statement, as would be shown by the evidence, were not living with her during the relevant time period for which defendant was charged with pandering and further guaranteed that the names of the three women would not come up in the State’s case. Prior to ruling on the motion for continuance the trial court decided to read Greathouse’s grand jury testimony, which had previously been furnished to defendant in discovery, and the recently revealed written statement of that witness in order to determine if the defendant would be prejudiced in his defense by the State’s failure to furnish the written statement prior to the day of trial. After a recess for that purpose the trial court denied the motion for continuance and the case proceeded to trial.
By statute in Illinois the granting or denying of a motion for a continuance in a criminal case is a matter within the sound discretion of the trial court. (Ill. Rev. Stat. 1977, ch. 38, par. 114 — 4(e).) The defendant argues that the trial court abused its discretion in denying his request for a continuance, and accordingly urges that his case must be reversed and remanded for a new trial. In determining whether the trial court has abused its discretion the appropriate circumstances of each case must be weighed with particular attention given to the reasons given to the trial court at the time the continuance is denied. (People v. Lott (1977), 66 Ill. 2d 290, 362 N.E.2d 312.) However, in the instant appeal the State contends that the defendant has waived this argument by his failure to allege as error the denial of his motion for a continuance in his written post-trial motion. The purpose served by the motion for a new trial is to provide the trial judge with an opportunity to correct alleged errors made during the trial. Consistent with this purpose, errors not asserted as a ground for a new trial are waived and cannot be raised for the first time on appeal. (People v. Harriston (1970), 46 Ill. 2d 348, 263 N.E.2d 840). Although there is an exception to this waiver rule, the alleged defect must be patent and plain error for the reviewing court to exercise its discretion to avoid the waiver rule and review the error alleged.
“Briefly, it may be said that the pivotal factors to be considered to determine whether or not an exercise of such discretion is warranted are, the closeness of the case, the conduct of the trial judge, the extent to which questionable evidence may have contributed to a guilty verdict, the fairness of the trial in general, and the magnitude of the errors alleged.” (People v. Largardo (1967), 82 Ill. App. 2d 119, 226 N.E.2d 492.)
We have considered these factors and agree with the State’s argument that the denial of the defendant’s motion for a continuance was insufficient to invoke the plain error doctrine in this case. In People v. Edwards (1977), 49 Ill. App. 3d 79, 363 N.E.2d 935, we applied the waiver rule despite the defendant’s argument that the doctrine of plain error was applicable. Although the Edwards case was reversed by the Illinois Supreme Court on another issue, the court stated with regard to the waiver issue, “[w]e agree with the appellate court that the defendant failed to preserve these contentions for appeal because they were not cited as the basis for this motion for a new trial.” (People v. Edwards (1978), 74 Ill. 2d 1, 383 N.E.2d 944.) We find the defendant’s failure to allege the denial of his motion for a continuance in his post-trial motion, waived that argument for this appeal.
Defendant’s second argument is that he was denied due process and equal protection of the law by the trial court’s failure to advise him of the specific sentence he would receive under the present and former sentencing laws prior to requiring that he elect under which law he wished to be sentenced. The defendant was permitted a choice of which sentencing law should be applied to him by section 8 — 2—4(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1008 — 2— 4(b)). The defendant concedes that the trial court explained the differences between the old and new sentencing acts to him. He theorizes, however, that his choice here was not meaningfully made despite the trial court’s explanation of the sentencing laws to him. In the recent case of People v. Peoples (1979), 71 Ill. App. 3d 842, 390 N.E.2d 554, we decided that the origin of the election to defendant as to which of the sentencing laws should be applied to him was statutorily and not constitutionally mandated. Accordingly we again reject the same due-process and equal-protection challenges which defendant Anderson makes to the legislature’s sentencing scheme in this case.
The defendant stresses the need to know what his actual sentence will be under both the old and the new sentencing law in order for him to make a meaningful election as to which he wishes applied to him. The election provided him can be meaningful without the trial court in effect giving two separate sentences in the alternative. It is axiomatic that the length of the sentence imposed within statutory guidelines is a matter within the trial court’s discretion at the close of the sentencing hearing. Here the defendant’s counsel, after the trial court had thoroughly explained the differences in the old and new sentencing laws, responded in open court with the defendant’s election of sentencing law. The defendant was present and apparently concurred in his counsel’s election as he did not raise any objection thereto. Defendant’s reliance on People v. Hollins (1972), 51 Ill. 2d 68, 280 N.E.2d 710, is misplaced. There the defendant was denied the right to make an election as to the applicable sentencing law. In the case at bar the defendant was allowed to make an election, and as we have determined the election made was meaningful in light of the extensive explanation of the trial court on the subject of the provisions of the old and new sentencing laws and their application to this defendant.
The judgment of conviction of the Circuit Court of Peoria County and the sentence imposed thereon are affirmed.
Judgment affirmed.
ALLOY and STENGEL, JJ., concur.