delivered the opinion of the court:
Defendant, Cartesus N. McGregor, pleaded guilty to aggravated unlawful use of a weapon (720 ILCS 5/24 — 1.6(a)(1), (a)(3)(A) (West 2004)) and was sentenced to probation. After successfully completing probation, defendant moved to vacate his conviction. Citing the seriousness of the offense, the trial court denied the motion. Defendant appeals, contending that the trial court abused its discretion. We affirm.
I. BACKGROUND
An indictment charged defendant with armed robbery (720 ILCS 5/18 — 2(a)(2) (West 2004)); aggravated unlawful use of a weapon while *778defendant was a street gang member, aggravated unlawful use of a weapon when a firearm was uncased, loaded, and immediately accessible, and aggravated unlawful use of a weapon without a firearm owner’s identification card (see 720 ILCS 5/24 — 1.6(a)(3) (West 2004)); and obstructing justice (720 ILCS 5/31 — 4(a) (West 2004)). Defendant pleaded guilty to one count of aggravated unlawful use of a weapon (aggravated unlawful use while the weapon was uncased, loaded, and immediately accessible). 720 ILCS 5/24 — 1.6(a)(1), (a)(3)(A) (West 2004). In exchange for a plea, the State agreed to dismiss the remaining counts and to recommend a sentence of 24 months of TASC probation, that is, a sentence of probation with completion of Treatment Alternatives for Safe Communities as a condition.
The factual basis for the plea showed that police stopped a car in which defendant was a passenger. Defendant was seen placing a loaded, .32-caliber handgun into the car’s glove box. In support of the plea agreement, the prosecutor noted that defendant had been placed on court supervision for criminal trespass to land in 1997 and had been charged with two misdemeanors in 2005, although the prosecutor did not recall the dispositions. The agreement was accepted, and defendant was sentenced to probation with TASC treatment as a condition of probation. In accord with statute, within 30 days, defendant filed a motion to vacate his conviction should he successfully complete TASC probation.
Defendant did complete probation, including paying his fines and fees. Thus, defendant proceeded on his motion to vacate the conviction. Defendant argued that he had successfully completed probation, was older and more mature, and was now employed. In response, the State focused on the nature of the original offense and, after tendering a copy of the grand jury proceedings, noted that defendant was a member of the Crips street gang in California, that at the time of defendant’s arrest there were gang members in the car with him, and that, although defendant denied knowledge of the gun, he placed it in the glove compartment.
The court denied the motion, stating:
“There was apparently some type, not [that] defendant was guilty of this, but the offense involved some type of robbery of an individual; from the grand jury transcript it appears that, that the crime was committed for the benefit of a street gang, and the defendant’s involvement after the crime was over at least was to place the gun or to try to secrete the gun so that the police wouldn’t find it.”
Defendant timely appeals.
*779II. ANALYSIS
The issue here is whether the trial court properly denied defendant’s motion to vacate his conviction under section 40 — 10(e) of the provisions now codified as the Alcoholism and Other Drug Abuse and Dependency Act (Act) (20 ILCS 301/1 — 1 et seq. (West 2006)). The purpose of the Act is to prevent drug abuse and encourage treatment and support rehabilitation by allowing eligible defendants to elect rehabilitative treatment instead of traditional sentencing. People v. Brown, 267 Ill. App. 3d 482, 484-85 (1994) (construing predecessor provision, the Illinois Alcoholism and Other Drug Dependency Act (Ill. Rev. Stat. 1991, ch. III½, par. 6351 — 1 et seq.)). Specifically, an offender who suffers from alcoholism or other drug addiction may elect to be sentenced to probation with substance abuse treatment as an alternative to traditional sentencing, unless one of several disqualifying factors is present. 20 ILCS 301/40 — 5 (West 2006). If a defendant elects or is certified by the court for treatment and, following an examination by a designated program, the court finds that the defendant is an alcoholic or drug addict who is likely to be rehabilitated through treatment, the court shall place him or her on probation and under the supervision of the designated program unless the court finds that there is no relationship between the offense and addiction or that imprisonment is necessary for protection of the public. 20 ILCS 301/40 — 10(b) (West 2006). If the defendant has not previously been convicted of any felony, and has not previously moved to vacate a conviction under this statute, he or she may move to vacate the conviction. 20 ILCS 301/40 — 10(e) (West 2006). In that case, “the court shall vacate the judgment of conviction and dismiss the criminal proceedings against him unless, having considered the nature and circumstances of the offense and the history, character!,] and condition of the individual, the court finds that the motion should not be granted.” 20 ILCS 301/40 — 10(e) (West 2006).
Although the statute does not use the word “discretion,” we agree with the parties that it provides a trial court with discretion to deny a motion to vacate a conviction under certain circumstances. Thus, we will reverse the trial court’s decision only upon an abuse of discretion. See People v. Pulliam, 254 Ill. App. 3d 92, 96-97 (1993). A trial court abuses its discretion when its ruling is so arbitrary, fanciful, or unreasonable that no reasonable person would agree with it. People v. Rincon, 387 Ill. App. 3d 708, 726 (2008).
Like the parties, we have been unable to locate any case specifically considering the purpose and effect of section 40 — 10(e). As a point of first impression, we find that one purpose is to facilitate the defendant’s rehabilitation by vacating the conviction from his or her *780record, thus allowing the defendant to more easily reintegrate into society. We note the mandatory language in the first portion of the statute, “the court shall vacate the judgment of conviction and dismiss the criminal proceedings against him.” However, the statute compels the court to consider the defendant’s character and the nature of the offense in ruling on a motion to vacate and, if the court finds that the motion should not be granted, the court is within its discretion to deny it.
Here, in denying the motion to vacate, the trial court focused primarily on the seriousness of the offense. After reviewing the grand jury transcripts, the court noted that the offense involved secreting a gun in an attempt to cover up the participation of fellow gang members in an armed robbery. Accordingly, the court properly focused on a factor outlined in the statute, that is, the “nature and circumstances” of the offense.
As the State argued, the facts of the robbery were that a juvenile “probationary” gang member was instructed to rob a drug dealer in order to gain full membership in the gang. The juvenile was driven to the meeting place in a car occupied by the gang member who had planned the robbery, defendant, and another gang member. After the juvenile entered the drug dealer’s car and robbed him at gunpoint, he fled with the other gang members, including defendant, until the car was stopped by police. Defendant then attempted to hide the gun in the glove compartment. The State argues that it is inconceivable that defendant was unaware of the robbery. Accordingly, the State contends, the trial court correctly concluded that the nature and circumstances of the offense were much more serious than the single count to which defendant pleaded guilty. We agree with the State that it was proper for the court to consider the nature and circumstances of the entire offense for which defendant was charged. Consideration is not limited to the nature and circumstances of the offense to which the defendant pleaded guilty.
Defendant focuses on his character and current condition and contends that the trial court should have vacated his conviction because the record shows that he successfully completed his treatment program, paid his fines and fees, and secured employment. Moreover, in the ensuing period, defendant had gotten two years older and presumably more mature.
In reply, the State points out that successful completion of probation (including completion of a treatment program and payment of all fines, costs, and other charges) is a prerequisite to seeking relief under section 40 — 10(e). In other words, had defendant not completed probation successfully, he would not have been able to seek relief in the first *781place. See 20 ILCS 301/40 — 10(e) (West 2006). Reading the statute as requiring automatic vacation of the conviction whenever a defendant successfully completes probation would effectively remove the trial court’s discretion and render the later portion of the section, i.e., consideration of the defendant’s character and the nature of the offense, superfluous. See People v. McClure, 218 Ill. 2d 375, 382 (2006) (statute must be construed as a whole, so as to not render any part meaningless or superfluous).
Similarly, that defendant was older (and presumably more mature) is implicit in successfully completing probation. Obviously, every defendant who completes a term of probation will be older than when he or she started. Thus, this factor is entitled to little weight. The single remaining factor, that defendant secured employment, though admirable and indicative of a positive direction in defendant’s life, does not overcome the trial court’s findings regarding the seriousness of the offense.
In sum, we hold that the trial court properly considered the nature and circumstances of the offense and the history, character, and condition of defendant. We cannot say that the court abused its discretion in weighing these factors.
III. CONCLUSION
The judgment of the circuit court of Kane County is affirmed.
Affirmed.
HUTCHINSON and BURKE, JJ., concur.