
    (Nos. 59235, 59236 cons.
    THE PEOPLE OF THE STATE OF ILLINOIS, Appellee and Appellant, v. GAYLORD RICHARDSON, Appellant and Appellee.
    
      Opinion filed October 19, 1984.
    
    
      Robert J. Agostinelli, Deputy Defender, and Verlin R. F. Meinz and Jean Herigodt, Assistant Defenders, of the Office of the State Appellate Defender, of Ottawa, for appellant and appellee Gaylord Richardson.
    Neil F. Hartigan, Attorney General, of Springfield, and Warren T. McNeill, State’s Attorney, of Monmouth (Mark L. Rotert and Michael V. Accettura, Assistant Attorneys General, of Springfield, and John X. Breslin and Vicki R. Wright, of the State’s Attorney’s Appellate Service Commission, of Ottawa, of counsel), for the People.
   JUSTICE SIMON

delivered the opinion of the court:

Gaylord Richardson was convicted of burglary in a jury trial in the circuit court of Warren County and sentenced to an extended term of 10 years’ imprisonment. The appellate court affirmed the conviction but remanded to the trial court for resentencing. (118 Ill. App. 3d 175.) The defendant sought leave to appeal his conviction to this court, and the State sought to appeal the remand. We granted both petitions and consolidated thé two appeals. 87 Ill. 2d R. 315.

Around 3 a.m. on April 16, 1982, the silent alarm at the Eagles Club in Monmouth was activated, alerting both a club trustee, Cecil Albert, and the Monmouth police. Together they entered the building, where they discovered the defendant Richardson in a supply closet. Although Albert described the defendant’s condition as “pretty far gone,” the defendant was able to walk and talk. He asked for beer and cigarettes which he had left on a table in the barroom. A search of the premises revealed those items. Nothing else was missing or out of place.

The defense at trial was that the defendant was so intoxicated that he could not form an intent to commit theft. The Criminal Code of 1961 (Ill. Rev. Stat. 1981, ch. 38, par. 19—1) defines burglary as “knowingly enterpng] or without authority remain[ing] within a building *** with intent to commit therein a felony or theft,” and the defendant argued, as he does in this court, that a necessary element of the crime of burglary, the element of intent to commit a theft, was not proved beyond a reasonable doubt. The appellate court remarked that the jury may infer the element of intent in a burglary case from the evidence of illegal entry into premises containing movable property which could be the subject of a theft. 118 Ill. App. 3d 175, 177.

The defendant contends that the remand was proper because of two sentencing errors. The defendant claims, and the appellate court agreed, that the Dangerous Drug Abuse Act (Ill. Rev. Stat. 1981, ch. 91½, pars. 120.9, 120.10) required the trial judge to advise him of his possible eligibility for drug-abuse treatment before sentencing. The appellate court, however, rejected his additional claim that the extended sentence was improper because it was based upon prior convictions which resulted from guilty pleas.

The defendant suggests that the appellate court erred by asserting that the conviction could be affirmed on the basis of the jury’s inference regarding the element of intent. Relying on People v. Housby (1981), 84 Ill. 2d 415, cert. denied (1981), 454 U.S. 845, 70 L. Ed. 2d 131, 102 S. Ct. 160, the defendant insists that each element of a crime must be proved beyond a reasonable doubt and that uncritical reliance on an inference deprives him of due process of law. But Housby is not relevant to this case.

Housby and the United States Supreme Court cases on which it is based (Sandstrom v. Montana (1979), 442 U.S. 510, 61 L. Ed. 2d 39, 99 S. Ct. 2450; County Court v. Allen (1979), 442 U.S. 140, 60 L. Ed. 2d 777, 99 S. Ct. 2213), involved jury instructions which encouraged the jury to draw inferences. The Housby test applies only to instructions which advise a jury of inferences it may draw; it insures that the jury applies the reasonable-doubt test. The defendant does not challenge the jury instructions in this case. They contained no references to inferences of any type. Rather, the instructions listed the elements of the crime of burglary, including intent, and informed the jury that each element of the crime must be proved beyond a reasonable doubt. Therefore the requirements of due process were satisfied. The jury, properly instructed, was allowed to consider all of the evidence and to reach its own conclusions.

Intent is a state of mind which can be inferred from surrounding circumstances. (People v. Terrell (1984), 99 Ill. 2d 427; People v. Richardson (1965), 32 Ill. 2d 497, 501; People v. Murff (1963), 29 Ill. 2d 303, 305.) In Terrell, the defendant was convicted of attempted armed robbery of a service station. As the specific intent to commit the completed crime is an element of the attempt, the defendant argued that his intent to commit armed robbery had not been proved beyond a reasonable doubt. This court disagreed and held that the jury could infer the necessary intent from the surrounding circumstances. Like the situation here, all of the evidence was circumstantial and an alternative explanation was proposed by the defendant, but the court found the evidence sufficient to permit an inference of the necessary intent. No other explanation of the defendant’s conduct seemed as plausible an explanation as the simple inference of intent to commit armed robbery in the service station. Taken as a whole, the circumstances of this case appear to be at least as compelling as those in Terrell. Once again, the jury could properly rely on any reasonable inference to conclude that no other scenario was as likely as the straightforward conclusion that the defendant entered the Eagles Club with the intent to commit a theft.

The crime of burglary requires that its elements often be proved by circumstantial evidence. (People v. Palmer (1964), 31 Ill. 2d 58.) Allowing a jury to rely on reasonable inferences from the direct evidence in the light of everyday experience in no way infringes upon the defendant’s due process rights.

Because the precautions announced in Housby do not apply, the problem is simply whether the evidence was sufficient to prove each element of the crime of burglary beyond a reasonable doubt. There is no doubt that defendant entered and remained in the Eagles Club building without authority to do so. The only question is whether the evidence was sufficient to infer an intent to commit theft.

In a burglary case, the relevant surrounding circumstances include the time, place and manner of entry into the premises, the defendant’s activity within the premises, and any alternative explanations offered for his presence. The evidence showed that the boards blocking a window in a meeting room had been removed; the window was hidden from view from the street; the police check revealed the remainder of the exterior to be secure; no one else was seen in or near the building; and the defendant was found in a closet. The jury could conclude that the defendant removed the boards, entered through the window, and hid in the closet to avoid detection. The entry occurred at 3 a.m., an hour at which he would expect the building to be deserted. Defendant’s beer and cigarettes left in the barroom indicated that he had been in that room before retreating to the closet. Both the barroom and the closet contained movable property which could have been the subject of theft. (Cf. People v. Johnson (1963), 28 Ill. 2d 441, 443.) When they discovered him in the closet, thé defendant was able to ask the police for his beer and cigarettes. Considering all the circumstances surrounding this illegal entry, the jury could reasonably infer the intent to commit theft.

While it is true that the defendant tried to prove that he was so drunk that he could not have known what he was doing and could not have formed an intent to commit theft, the jury was free to reject this defense, particularly in view of conflicting testimony as to how many drinks defendant had consumed and how drunk he appeared to be. The jury concluded beyond a reasonable doubt that the defendant entered the Eagles Club building without authority with the intent to commit theft, and the evidence which we have detailed above established guilt beyond a reasonable doubt. The jury’s verdict must, therefore, stand.

Next, relying on People v. Kuesis (1980), 83 Ill. 2d 402, the State contends that the appellate court erred in holding that the Dangerous Drug Abuse Act requires the trial judge to advise the defendant of his eligibility for treatment before sentencing him. The presentence report, which was incorporated into the record of this case, indicated that the defendant was an addict. Thus there was no doubt that the trial judge knew that the defendant was an addict (Ill. Rev. Stat. 1981, ch. 91½, par. 120.10). However, the defendant was on parole at the time. The question before us is, therefore, whether the trial judge was obligated to inform the defendant of the possibility of treatment under the Act even though the defendant did not first petition the court for consideration under the Act and had not affirmatively produced the consent of his parole officer.

As in this case, the defendant in Kuesis failed to petition the trial court for consideration under the Dangerous Drug Abuse Act (cf. People v. Teschner (1980), 81 Ill. 2d 187) or affirmatively produce the consent of his probation officer (People v. Phillips (1977), 66 Ill. 2d 412, 416). Section 8 of the Act stated both then and now that “[a]n addict *** convicted of a crime is eligible to elect treatment *** instead of prosecution or probation *** unless *** (e) the addict is on probation or parole and the appropriate parole or probation authority does not consent to that election ***.” (Ill. Rev. Stat 1981, ch. 91½, par. 120.8.) In Kuesis this court held that the trial judge was not obliged to inform the defendant of his eligibility for treatment because the statute stated that the judge “may” advise him, leaving the discretion with the trial judge. (People v. Kuesis (1980), 83 Ill. 2d 402, 407.) Kuesis, however, was decided under an earlier version of the statute. Applying the current version, the rationale of Kuesis is no longer relevant.

Prior to mid-1979, the Dangerous Drug Abuse Act read:

“If a court has reason to believe that an individual convicted of a crime is an addict or the individual states that he is an addict and the court finds that he is eligible to make the election provided for under Section 8, the court may advise him that he may be placed on probation if he elects to submit to treatment and is accepted for treatment ***.” (Emphasis added.) (Ill. Rev. Stat. 1977, ch. 91½, par. 120.10.)

Effective September 11, 1979, the Dangerous Drug Abuse Act was amended by changing the word “may” to “shall.” Ill. Rev. Stat. 1979, ch. 91½, par. 120.10.

The fundamental principle of statutory construction is to give effect to the intent of the legislature. (People v. Alejos (1983), 97 Ill. 2d 502, 511; In re Application of Rosewell (1983), 97 Ill. 2d 434, 440.) The word “shall” indicates a mandatory obligation, unless the context indicates otherwise. (In re Application of Rosewell (1983), 97 Ill. 2d 434, 440; People v. Youngbey (1980), 82 Ill. 2d 556, 562; Andrews v. Foxworthy (1978), 71 Ill. 2d 13, 21.) Further, every amendment to a statute is presumed to have some purpose. (People v. Youngbey (1980), 82 Ill. 2d 556, 563; McLaughlin v. People (1949), 403 Ill. 493, 501.) Here the legislature replaced the ordinarily permissive term “may” with the stronger term “shall.” The Phillips decision indicated to the legislature that this court did not construe “may” as placing a mandatory obligation on the trial judge. In this context, the purpose of the amendment must have been to remove discretion from the sentencing judge with respect to advising the defendant of the availability of treatment, and the term “shall” must therefore be construed as mandatory.

We are not persuaded by the State’s argument that the eligibility determination which must be made by the trial judge is not affected by the amendment. In the State’s view, the obligation to advise the defendant only arises after the judge has determined that the defendant is eligible under section 8 of the Act. The State argues that lack of consent from the defendant’s parole or probation officer makes him ineligible; consequently, the State contends, the judge has no obligation to advise the defendant until the defendant establishes both by petitioning the court for consideration and affirmatively producing this consent that he is eligible.

Given the change in the statute, this rationale is no longer viable. This court must consider the language of the amended statute in light of the need for the amendment and the purpose which it serves. (People v. Alejos (1983), 97 Ill. 2d 502, 511; People ex rel. Cason v. Ring (1968), 41 Ill. 2d 305, 310; Mid-South Chemical Corp. v. Carpentier (1958), 14 Ill. 2d 514, 517; People ex rel. Roan v. Wilson (1950), 405 Ill. 122, 127-28.) The purpose of the statute is informational. But, unless the defendant already knows that he may be eligible for treatment under the Act, he will not know that he needs any consent. To obtain the consent of his parole or probation officer the defendant must already know that he may be eligible for treatment under the Act. There seems little point to a statute which requires a judge to tell the defendant something he already knows. The statute is meaningful only if we assume that the defendant is unaware of his possible eligibility, and that is why the trial judge must inform him. Once he is advised of the Act, the defendant can seek the necessary consent from his parole or probation officer. The Act states that the defendant is eligible unless he does not obtain this consent. In effect, the probation officer exercises a type of veto power over an otherwise eligible defendant being accepted for treatment.

We therefore hold that section 10 of the Dangerous Drug Abuse Act requires the trial judge to inform every defendant whom he knows or has reason to believe is an addict of the possibility of treatment under the Act even where, as here, acceptance into a treatment program may be vetoed by the defendant’s parole or probation officer. The trial judge’s mandatory advice does not guarantee that the defendant will receive treatment under the Act. It merely sets into motion the further procedures specified in the statute.

The defendant’s final claim that the trial court acted improperly by basing an extended-term sentence on convictions resulting from guilty pleas is without merit. Section 5 — 5—3.2 of the Unified Code of Corrections states in part that an extended-term sentence may be imposed:

“(1) When a defendant is convicted of any felony, after having been previously convicted in Illinois of the same or greater class felony, within 10 years, *** and such charges are separately brought and tried ***.” (Emphasis added.) (Ill. Rev. Stat. 1981, ch. 38, par. 1005—5— 3.2(b)(1).)

The defendant argues that his prior convictions were never “tried” because they were obtained by guilty pleas. There is no merit to this contention. As the appellate court noted, a proceeding in which a trial judge accepts a guilty plea is a trial. (118 Ill. App. 3d 175, 182.) Our appellate court has addressed this issue on a number of other occasions, always reaching the same result. (People v. Martin (1984), 121 Ill. App. 3d 196, 215; People v. Poree (1983), 119 Ill. App. 3d 590, 600; People v. Eddington (1983), 117 Ill. App. 3d 953, 963-64; People v. Way (1983), 115 Ill. App. 3d 198, 201-02; People v. Baker (1983), 114 Ill. App. 3d 803, 809-10.) We adopt the reasoning of those decisions. The purpose of section 5 — 5— 3.2(b) is to discourage recidivism, and that purpose is served by exposing all repeat offenders, including those who plead guilty, to the possibility of an extended sentence. Further, a “conviction” is defined by the Unified Code of Corrections as “a judgment of conviction or sentence entered upon a plea of guilty or upon a verdict or finding of guilty.” Ill. Rev. Stat. 1981, ch. 38, par. 1005-1-5.

For the reasons explained above, we affirm the appellate court’s decision and remand to the trial court with instructions that the defendant be advised of his eligibility for treatment under the Dangerous Drug Abuse Act.

Appellate court affirmed; circuit court affirmed in part and reversed in part; cause remanded, with directions.  