
100 Ill. App.3d 418 (1981)
426 N.E.2d 1139
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
BRETT HOYER, Defendant-Appellant.
No. 80-847.
Illinois Appellate Court  Second District.
Opinion filed September 22, 1981.
*419 David P. Schippers, of Schippers, O'Brien & Long, of Chicago, and Stuart L. Whitz, of Aurora, for appellant.
Robert Morrow, State's Attorney, of Geneva (Phyllis J. Perko and Gene Armentrout, both of State's Attorneys Appellate Service Commission, of counsel), for the People.
Judgment affirmed.
Mr. JUSTICE HOPF delivered the opinion of the court:
Defendant pleaded guilty to armed robbery and was sentenced to 25 years in the Department of Corrections. He appeals, contending that the court should have permitted him to withdraw his plea and that the sentence imposed was excessive.
On the afternoon of March 5, 1979, the 17-year-old defendant, having earlier ingested three "hits" of LSD and smoked hashish, beat Manutchehr Kaboli to death and robbed him of his wallet. Defendant was charged by indictment with three counts of murder, armed robbery, and armed violence.
After being admonished by the court as required by Supreme Court Rule 402 (Ill. Rev. Stat. 1979, ch. 110A, par. 402), defendant pleaded guilty to armed robbery in exchange for the State's agreement to enter a nolle prosequi with regard to the remaining charges.
The first issue defendant raises is that his guilty plea was involuntarily and unknowingly entered. He bases this on the fact that in admonishing him before the entry of his plea the court did not advise him that he could be subject to an extended term pursuant to section 5-8-2 of the Unified Code of Corrections (Ill. Rev. Stat. 1979, ch. 38, par. 1005-8-2).
At the sentencing hearing the prosecuting attorney stated that due to *420 the brutal nature of the crime the State could ask for an extended term. He added that the State was not asking for that but for 30 years, the maximum term for armed robbery, a Class X felony, when extended term is not involved. The trial judge told defendant at the time of sentencing that psychiatric reports relating the effects of LSD on defendant's behavior were the reason it would not consider an extended term.
Section 5-8-2 of the Criminal Code provides for the imposition of an extended term of imprisonment for offenders when aggravating factors are involved. This section provides a safeguard to prevent the defendant pleading guilty from unwittingly exposing himself to such a sentence:
"If the conviction was by plea, it shall appear on the record that the plea was entered with the defendant's knowledge that a sentence under this Section was a possibility. If it does not so appear on the record, the defendant shall not be subject to such a sentence unless he is first given an opportunity to withdraw his plea without prejudice." Ill. Rev. Stat. 1979, ch. 38, par. 1005-8-2(b).
Defendant argues that because he was not advised of the possibility of an extended term at the time he pleaded guilty the court should have later granted his motion to withdraw his plea. Defendant contends he was subject to, that is, exposed and vulnerable to, an extended term or in danger of receiving such a sentence.
Supreme Court Rule 402 (Ill. Rev. Stat. 1979, ch. 110A, par. 402) required that in a hearing on a plea of guilty a defendant must be admonished of the possible minimum and maximum penalties prescribed by law. The rule requires substantial compliance. (People v. Krantz (1974), 58 Ill.2d 187, 317 N.E.2d 559.) However, even when the rule is not substantially complied with, a reviewing court will not vacate a guilty plea absent an allegation and proof of prejudice. (People v. Dudley (1974), 58 Ill.2d 57, 316 N.E.2d 773; People v. Cohn (1980), 91 Ill. App.3d 209, 414 N.E.2d 543.) It has been held, for example, that where consecutive terms are possible a failure to admonish defendant of such a possibility at the hearing on a guilty plea is not a ground for withdrawal of that plea where in fact no consecutive terms are imposed. (People v. Whitlow (1980), 86 Ill. App.3d 858, 411 N.E.2d 1354; People v. Waud (1976), 43 Ill. App.3d 85, 356 N.E.2d 628, aff'd on other grounds (1977), 69 Ill.2d 588; People v. Mass (1975), 31 Ill. App.3d 759, 334 N.E.2d 452; People v. Back (1974), 18 Ill. App.3d 746, 310 N.E.2d 420.) Further, where the trial court understates the possible maximum penalty but sentences within the limits it had stated, no prejudice results, and defendant is not entitled to withdraw his guilty plea. People v. Hrebenar (1971), 131 Ill. App.2d 877, 266 N.E.2d 733.
 1 There is no authority directly addressing the question that arises when *421 a trial court fails to apprise a defendant of the possibility of an extended sentence. Defendant argues that the above-cited cases do not support the State's position that the fact he was not sentenced to an extended term negates any error by the court in failing to admonish defendant of the possibility. He argues that section 5-8-2 states not merely that a defendant not advised of the possibility of an extended term may not be so sentenced, but also that he shall not be "subject to" an extended term. Defendant contends that the court's comment that it would not consider an extended term because "psychiatric reports have some significance" evidences the fact that he was "subject to" an extended term at that time. We disagree. We think that, regardless of the court's comment, the failure to admonish defendant precluded the imposition of an extended term. It was incorrect for the court to assume it had the option of so sentencing defendant, but where a defendant by law may not be sentenced to an extended term and he is not so sentenced we do not think reversible error is committed.
Defendant also argues that the court should have permitted him to withdraw his plea because the prosecuting attorney induced him to plead guilty by advising his counsel that an extended penalty would not be sought. At the hearing on the guilty plea the prosecutor advised the court that the agreement consisted of defendant changing his plea to guilty on the armed robbery charge in exchange for the State dropping the charges on the remaining counts. The prosecutor added that "basically * * * there is no agreement with regard to sentencing." Defendant and his attorney stated that the agreement was correctly stated by the prosecution. At the sentencing hearing the prosecutor commented that "[d]ue to the brutality of the case and the surrounding circumstances * * * we could ask for an extended term which would make it anywhere between 12 and 60 years. We are not asking for it in this case. What we are asking for is the maximum [penalty], that being 30 years." At the hearing on defendant's motion to withdraw his guilty plea defendant's attorney informed the court that "I didn't mention to [defendant] that there was a possibility of an enhanced sentence. I told him it should not be considered in his determination whether or not to enter a plea, because I think the State had informed me they had no intention of seeking an enhanced sentence."
 2 We think the prosecutor's comment to the trial court that the State could seek an extended term was merely a comment meant to reflect the seriousness with which it viewed the crime. Judging by defendant's understanding of the plea agreement, the State could not seek such a sentence for defendant. What the State sought, however, was not an extended term but the maximum penalty within the usual range of sentences for armed robbery. According to defendant's counsel, the State *422 promised defendant it would not seek an extended term, and it did not. At most, its comment was an empty threat. Additionally, we think the State's remark does not show that the State misrepresented to defendant the possible penalties.
Defendant's final contention is that his 25-year sentence was excessive.
At the hearing in aggravation and mitigation, defendant testified that on March 5, 1979, he had taken three "hits" of LSD and had smoked some hashish and marijuana. Defendant told two of his friends that he had a business dispute with Mr. Kaboli, a junk dealer. Defendant stated that he and his friends decided to go to the junkyard to see if they could get defendant's money back. Once at the junkyard, defendant took a baseball bat from his car and hid it underneath his jacket. The three boys entered the yard and defendant hid while the other youths attempted to lure Kaboli towards him. The boys succeeded in luring Kaboli to defendant, but defendant "decided not to do anything." He "couldn't do it"; he "couldn't hit him." All three boys left the junkyard. Later, after the other boys had berated defendant for failing to hit Kaboli they returned to the junkyard and defendant again hid while the other boys attempted to lure Kaboli towards him. Kaboli was suspicious and ordered the other boys out of the junkyard. Defendant testified that he attempted to leave the junkyard but Kaboli saw him and asked him what he was doing there. Defendant stated that he took the bat from underneath his coat and hit Kaboli on the shoulder. Kaboli fell, rose from the ground and came after defendant. Defendant then hit Kaboli over the head repeatedly. Defendant further testified that during the incident he would sometimes know what he was doing, while at other times he would not know what he was doing because of the effects of the drug.
Defendant also offered into evidence three psychiatric reports. One report indicated that defendant was incapable of forming a requisite intent to commit murder because he was a novice with LSD usage. The second report indicated that if it were not for defendant's use of the drug, defendant would not have committed the crime. The third report indicated that although defendant's ability to appreciate the criminality of his act was diminished, defendant could have had the requisite mental state to commit murder despite his drug usage. Several other people testified on defendant's behalf. They indicated that he did not have a violent disposition, that he was a good student and that he came from a closely knit family.
The presentence report indicated that defendant had one misdemeanor conviction, for acquisition of liquor by a minor. That offense occurred on May 3, 1980.
*423 Defendant first asserts that the sentence of 25 years was more than three times the length of the average sentence imposed for armed robbery throughout the State. In support of this assertion defendant relied upon the "1979 Statistical Presentation" prepared by the Illinois Department of Corrections in compliance with section 5-5-4.3 of the Unified Code of Corrections (Ill. Rev. Stat. 1979, ch. 38, par. 1005-5-4.3). The record reveals that defendant failed to present this survey to the trial court, however.
Defendant next asserts that the court did not give adequate attention to his age, remorse, rehabilitation potential, morals and general character background and history. The result, he contends, is a sentence greatly at variance with the purpose and spirit of the law and an abuse of discretion.
 3, 4 The trial court's remarks at the close of the sentencing hearing reveal, however, a deep concern for the factors that defendant says it ignored. The court's words also reflected, however, its recognition that defendant voluntarily ingested drugs and committed a terrible crime with tragic consequences for all concerned, not least of all for defendant. A trial court is in a better position than a court in review to consider the myriad of factors involved in imposing the proper sentence. (People v. Perruquet (1977), 68 Ill.2d 149, 368 N.E.2d 882.) A reviewing court may modify a sentence only upon a finding of an abuse of discretion. (People v. Cox (1980), 82 Ill.2d 268, 412 N.E.2d 541; People v. Perruquet.) We must conclude that the trial court, having given full consideration to those matters which comprise the sentencing determination, did not abuse its discretion in sentencing defendant to 25 years in the Department of Corrections.
For the foregoing reasons we affirm the judgment and the sentence of the trial court.
Affirmed.
UNVERZAGT and REINHARD, JJ., concur.
