
189 Ill. App.3d 934 (1989)
545 N.E.2d 1059
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellant,
v.
ANDREW JURIS, Defendant-Appellee.
No. 2-88-0751.
Illinois Appellate Court  Second District.
Opinion filed October 19, 1989.
Roger T. Russell, State's Attorney, of Belvidere (William L. Browers and Martin P. Moltz, both of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
G. Joseph Weller and Patrick M. Carmody, both of State Appellate Defender's Office, of Elgin, for appellee.
Judgment affirmed.
*935 JUSTICE McLAREN delivered the opinion of the court:
Defendant, Andrew Juris, was charged via information with criminal sexual assault (Ill. Rev. Stat. 1987, ch. 38, par. 12-13(a)(1)) on January 7, 1988. The State amended the information on April 15, 1988, to apply an enhanced sentencing provision (Ill. Rev. Stat. 1987, ch. 38, par. 12-13(b)), which became effective January 1, 1988. This amended sentencing section allowed enhancement of the sentence for criminal sexual assault from a Class 1 felony to a Class X felony for "[a] second or subsequent conviction for a violation of this Section or under any similar statute of this State or any other state for any offense involving criminal sexual assault that is substantially equivalent to or more serious than the sexual assault prohibited under this Section." (Ill. Rev. Stat. 1987, ch. 38, par. 12-13(b).) Defendant moved to dismiss the amended information, and the trial court, after a hearing, struck the enhancement language, along with the term "Class X felony," from the information. The State appeals from this action.
Defendant was convicted in 1979 of the Class 1 felony of attempted rape. The State sought to use this conviction as the basis for enhancing defendant's sentence upon conviction of the criminal-sexual-assault charge. On appeal, the State contends that the crimes of attempted rape and criminal sexual assault are "substantially equivalent," thus allowing use of the enhancement provision.
The State interprets section 12-13 as allowing enhancement for any offense involving criminal sexual assault that has a penalty substantially equivalent to or more serious than that prescribed in section 12-13. The State argues that since both the old offense of attempted rape and the new offense of criminal sexual assault are both Class 1 felonies (Ill. Rev. Stat. 1983, ch. 38, pars. 8-4(c)(2), 11-1(c); Ill. Rev. Stat. 1987, ch. 38, par. 12-13(b)), the offenses are "substantially equivalent." We disagree with the State's interpretation, and we affirm the trial court.
 1, 2 The cardinal rule of statutory construction is to ascertain and give effect to the intent and meaning of the legislature. (People v. Boykin (1983), 94 Ill.2d 138, 141.) The language used in the statute is the primary source of legislative intent. (People v. Sierra (1984), 122 Ill. App.3d 822, 824.) Where the statutory language is clear and unambiguous, the function of the court is to enforce the statute as enacted. (Harvey Firemen's Association v. City of Harvey (1979), 75 Ill.2d 358, 363.) Any ambiguities in a penal statute, especially in the case of enhancement provisions, must be resolved in the defendant's favor. People v. McCarty (1983), 94 Ill.2d 28, 34-35; Sierra, 122 Ill. App.3d at 824.
*936  3 Section 12-13(b) provides for enhancement for a second or subsequent conviction "for any offense involving criminal sexual assault that is substantially equivalent to or more serious than the sexual assault prohibited under this Section." (Emphasis added.) (Ill. Rev. Stat. 1987, ch. 38, par. 12-13(b).) Thus, it is the elements of the offense, and not the penalty for the offense, which must be compared to the section 12-13 criminal sexual assault.
 4 Such a comparison clearly shows that the offense of attempted rape is not substantially equivalent to or more serious than the offense charged here. Criminal sexual assault requires an act of sexual penetration. (Ill. Rev. Stat. 1987, ch. 38, pars. 12-13(a)(1), (a)(2), (a)(3); People v. Morgan (1986), 149 Ill. App.3d 733, 738.) Attempted rape did not require penetration; the offender simply must have intended to accomplish intercourse by force against the victim's will and must have taken a substantial step toward accomplishing his purpose. (People v. Hanley (1977), 50 Ill. App.3d 651, 659.) The absence of the element of penetration renders the offense of attempted rape inferior to criminal sexual assault. Attempted rape is an inchoate offense; by definition it is an incomplete effort to commit rape. The incomplete effort is not equivalent to the completed effort. The amended information was properly dismissed.
For these reasons, the circuit court of Boone County is affirmed.
Affirmed.
INGLIS and REINHARD, JJ., concur.
