delivered the judgment of the court:
Plaintiff, Craig Cummins, filed suit in the circuit court of St. Clair County to recover underinsuredmotorist benefits from defendant, Country Mutual Insurance Company (Country Mutual). Country Mutual filed a motion to dismiss plaintiff’s complaint contending that the liable driver’s vehicle was not underinsured, as defined in the Illinois Insurance Code, because the driver carried liability limits which were equal to the limits of plaintiff’s underinsured-motorist coverage. The trial court granted defendant’s motion to dismiss, and plaintiff appealed. The appellate court reversed and remanded the cause for further proceedings, with one justice specially concurring. 281 Ill. App. 3d 5. The appellate court held that plaintiff could state a claim for the underinsured-motorist coverage provided by Country Mutual. We granted defendant’s petition for leave to appeal. 155 Ill. 2d R. 315.
The sole issue before this court is whether plaintiff could state a claim to recover the shortfall between his underinsured-motorist policy limits and the amount he actually recovered from the liable driver’s insurance, when the liable driver’s policy has limits identical to plaintiff’s underinsured-motorist coverage, but the coverage was exhausted by payments to other injured claimants. For the reasons which follow, we affirm the judgment of the appellate court.
On February 20, 1992, Cummins suffered injuries in a two-car accident and sustained over $50,000 in damages. Cummins was the passenger in a car insured by Country Mutual. At the time of the accident, Cummins was covered by the Country Mutual insurance policy, which provided both uninsured- and underinsuredmotorist benefits in the amount of $50,000 per person and $100,000 per accident. The other motorist, who col-*477tided with the Country Mutual vehicle, was determined to be at fault and had insurance with identical liability limits of $50,000 per person and $100,000 per accident. Cummins received a court-approved, good-faith settlement of $35,000 from the at-fault driver, with the balance of the liability proceeds going to injured passengers in the at-fault driver’s vehicle.
Cummins filed suit against Country Mutual seeking the $15,000 difference between the $35,000 which he received as a settlement from the at-fault driver’s liability insurance and the $50,000 limit of Country Mutual’s underinsured-motorist coverage. Cummins is the sole claimant to Country Mutual’s underinsuredmotorist coverage. Country Mutual filed a motion to dismiss" plaintiff’s complaint for failure to state a cause of action (735 ILCS 5/2 — 615 (West 1992)), claiming that the at-fault driver’s vehicle was not "underinsured” as defined in the policy and section 143a — 2(4) of the Illinois Insurance Code (215 ILCS 5/143a — 2(4) (West 1992)). Defendant argued that even though plaintiff was not indemnified up to the $50,000 amount guaranteed by defendant’s underinsured-motorist coverage, the at-fault driver’s vehicle did not meet the definition of underinsured because the limits of liability coverage were identical to the limits of plaintiff’s underinsuredmotorist coverage. According to defendant, Cummins could not recover any underinsured-motorist benefits.
Initially, the trial court denied defendant’s motion to dismiss. However, the trial court reconsidered its original ruling in tight of Purlee v. Liberty Mutual Fire Insurance Co., 260 Ill. App. 3d 11 (1994). The trial court felt compelled to follow the decision in Purlee, which held that where the at-fault driver’s liability insurance limits "equal or exceed the underinsured motorist coverage limits, underinsured motorist coverage is not applicable.” See Purlee, 260 Ill. App. 3d at 27. Here, the *478at-fault motorist’s insurance policy limits equalled plaintiff’s underinsured-motorist policy limits. Based on the reasoning in Purlee, the trial court found that the at-fault motorist was not underinsured, and granted defendant’s motion to dismiss.
The appellate court reversed and remanded with one justice specially concurring. 281 Ill. App. 3d 5. The court found that Country Mutual’s insurance policy was ambiguous and subject to a reasonable interpretation other than the one urged by defendant. 281 Ill. App. 3d at 13. The court looked to the language of section 143a— 2(4) and the intent of the statute to determine whether the availability of underinsured-motorist coverage should be measured by comparing the limit of the plaintiff’s underinsured-motorist coverage to the” stated limits of the at-fault motorist’s liability coverage or to the amount the plaintiff actually recovers from the at-fault motorist.
The court held that the relevant factor to be considered is the amount actually recovered from the at-fault driver, not the limits of liability coverage. 281 Ill. App. 3d at 13. In the present case, there was a gap between the $35,000 actually recovered from the at-fault motorist’s insurance and plaintiff’s $50,000 underinsuredmotorist limits. The appellate court concluded that the at-fault motorist was underinsured and, therefore, plaintiff could state a claim for $15,000 in underinsuredmotorist benefits. 281 Ill. App. 3d at 14.
As stated, at issue is whether Cummins can state a claim to recover the difference between his underinsured-motorist coverage limits and the amount he actually received from the at-fault motorist’s liability policy. We must determine whether the at-fault vehicle in this case was considered an “underinsured motor vehicle,” enabling plaintiff to state a claim against Country Mutual for underinsured-motorist benefits. Sec*479tian 143a — 2(4), the underinsured-motorist provision of the Illinois Insurance Code, provides:
"For the purpose of this Code the term 'underinsured motor vehicle’ means a motor vehicle whose ownership, maintenance or use has resulted in bodily injury or death of the insured, as defined in the policy, and for which the sum of the limits of liability under all bodily injury liability insurance policies or under bonds or other security required to be maintained under Illinois law applicable to the driver or to the person or organization legally responsible for such vehicle and applicable to the vehicle, is less than the limits for underinsured coverage provided the insured as defined in the policy at the time of the accident. The limits of liability for an insurer providing underinsured motorist coverage shall be the limits of such coverage, less those amounts actually recovered under the applicable bodily injury insurance policies, bonds or other security maintained on the underinsured motor vehicle.” 215 ILCS 5/143a — 2(4) (West 1992).
Country Mutual’s insurance policy defined an underinsured motor vehicle as follows:
"2. Underinsured motor vehicle means any type of motor vehicle or trailer for which the sum of all liability bonds or policies at the time of an accident are less than the limit of this insurance.” (Emphasis in original.)
The issue before us is one of statutory construction, requiring the court to first look at the language of the underinsured-motorist statute to ascertain and give effect to the legislature’s intent. State Farm Fire & Casualty Co. v. Yapejian, 152 Ill. 2d 533, 540-41 (1992). In determining legislative intent, a court may also consider the reason and necessity for the law, the evils to be remedied, and the objectives to be attained. Yapejian, 152 Ill. 2d at 541. In construing statutory language, a court will assume that the legislature did not intend to produce an absurd or unjust result. Yapejian, 152 Ill. 2d at 541.
Country Mutual contends that under the clear language of section 143a — 2(4) and the policy provision, *480underinsured-motorist coverage is triggered only when the claimant carries a higher amount of underinsuredmotorist coverage than the amount of liability coverage maintained by the at-fault driver. See Purlee, 260 Ill. App. 3d at 26. Defendant notes that the first sentence of section 143a — 2(4) expressly defines an "underinsured motor vehicle” by reference to the limits of liability coverage compared to the limits of underinsuredmotorist coverage. Therefore, according to Country Mutual, the amount of insurance proceeds actually recovered from the at-fault driver is irrelevant when determining whether a motorist is underinsured. Since there were identical limits of coverage in this case, Country Mutual claims that the unambiguous language contained in both section 143a — 2(4) and the policy provision compels a finding that the at-fault motorist was not underinsured.
Plaintiff disagrees with this interpretation of section 143a — 2(4) and the policy at issue and argues that the language defining an underinsured motorist is ambiguous. Specifically, plaintiff claims that the statute simply does not say whether the definition of underinsured motorist is meant to refer to the recoverable limits of an at-fault motorist’s liability coverage or to the stated limits of that coverage, regardless of the amount actually available. Similarly, plaintiff contends that the definition contained in Country Mutual’s policy does not specifically refer to the stated limits of the at-fault driver’s liability insurance as opposed to the recoverable limits.
The underinsured-motorist statute defines an "underinsured motor vehicle” as one "for which the sum of the limits of liability under all bodily injury liability insurance policies *** is less than the limits for underinsured coverage.” 215 ILCS 5/143a — 2(4) (West 1992). We agree with plaintiff that it is unclear from the definition *481whether underinsured-motorist status should be determined by comparing the limits of plaintiff’s underinsured-motorist coverage to the stated limits of liability coverage or to the recoverable limits. The definition, contained in both the statute and Country Mutual’s policy, does not expressly refer to the stated policy limits as opposed to the amount of liability insurance actually recovered. However, the second sentence of section 143a — 2(4) does specifically refer to the amount of insurance proceeds actually recovered and provides that "[t]he limits of liability for an insurer providing underinsured motorist coverage shall be the limits of such coverage, less those amounts actually recovered under the applicable bodily injury insurance policies *** maintained on the underinsured motor vehicle.” 215 ILCS 5/143a — 2(4) (West 1992).
Under this second sentence, the limits of an insurer’s liability are calculated by taking the limits of underinsured-motorist coverage, less the amount actually recovered from the at-fault driver’s liability insurance. The statute recognizes that the recoverability of proceeds must be considered when calculating the liability of an insurer who provides underinsured-motorist coverage. Therefore, the amount actually recovered may be the appropriate figure to be used in determining whether a vehicle is underinsured.
Country Mutual disputes this interpretation and urges us to follow the appellate court cases which hold that the second clause of the statute only needs to be examined after there has been an initial determination that the at-fault driver’s vehicle is underinsured. See Purlee, 260 Ill. App. 3d at 26-27; Moriconi v. Sentry Insurance of Illinois, Inc., 193 Ill. App. 3d 904, 908 (1990). Country Mutual contends that under Purlee and Moriconi, for a liable vehicle to be considered underinsured, an injured party must carry higher amounts of *482underinsured-motorist coverage than the at-fault driver’s liability coverage. Purlee, 260 Ill. App. 3d at 26; Moriconi, 193 Ill. App. 3d at 908. Country Mutual argues that first this determination of whether an at-fault vehicle is underinsured must be made, and then, if the vehicle meets the definition of "underinsured,” this second clause only comes into play to calculate the amount of liability.
We disagree. In ascertaining the meaning of a statute, the statute should be read as a whole and all of the relevant parts must be considered. Kraft, Inc. v. Edgar, 138 Ill. 2d 178, 189 (1990). Therefore, the second sentence of section 143a — 2(4) must be read in conjunction with the definition provided in the first sentence. The definition does not specifically refer to an "underinsured motor vehicle” in terms of comparing the limits of underinsured-motorist coverage to the amount of liability insurance actually recovered. However, the second sentence recognizes that injured parties may recover the difference between their underinsuredmotorist policy limits and the amount they actually recover from the at-fault driver’s liability insurance. We will not read the definition portion of the statute to prevent a recovery of insurance proceeds when the very next sentence authorizes the recovery of the same proceeds.
Defendant also interprets the language of the insurance policy itself to deny underinsured-motorist benefits when the limits of coverage are identical. As with the definition portion of the statute, we will not read Country Mutual’s policy to deny coverage when such coverage is permitted in the second sentence of the underinsured-motorist statute. Although parties are generally free to enter into their own contracts, statutes in force at the time an insurance policy was issued are controlling. See Bertini v. State Farm Mutual Automo *483 bile Insurance Co., 48 Ill. App. 3d 851, 854 (1977). The purpose underlying a statute cannot be circumvented by inserting a contrary or restricting provision in an insurance policy. Severs v. Country Mutual Insurance Co., 89 Ill. 2d 515, 520 (1982). Any conflict between statutory and insurance policy provisions will be resolved in favor of the statutory provisions. DC Electronics, Inc. v. Employers Modern Life Co., 90 Ill. App. 3d 342, 348 (1980). Therefore, we resolve any conflict between the underinsured-motorist statute and Country Mutual’s policy, in favor of the statute. As stated, the statutory language permits plaintiff to recover underinsuredmotorist benefits up to the policy limits.
Furthermore, providing coverage that fills the gap between the amount actually recovered from the liability insurance and the underinsured-motorist policy limits is consistent with the intent of the underinsuredmotorist statute. The cardinal rule of statutory construction "is to ascertain and give effect to the true intent and meaning of the legislature.” Solich v. George & Anna Portes Cancer Prevention Center of Chicago, Inc., 158 Ill. 2d 76, 81 (1994). When intent is unclear from the statutory language itself, courts may consider the purpose behind the law and the evils the law was designed to remedy. Solich, 158 Ill. 2d at 81. When construing section 143a — 2(4), this court has stated that the purpose of underinsured-motorist coverage is the same as the underlying purpose of uninsured-motorist coverage, which is "to place the insured in the same position he would have occupied if the tortfeasor had carried adequate insurance.” Sulser v. Country Mutual Insurance Co., 147 Ill. 2d 548, 555 (1992).
In Sulser, this court addressed the issue of whether Country Mutual could reduce payments due to an insured under underinsured-motorist coverage by the amount of workers’ compensation benefits received by *484the insured. Sulser, 147 Ill. 2d at 551. To resolve this issue, the court examined the House debates on section 143a — 2(3), which is now section 143a — 2(4). The court concluded that the drafters’ intent in providing underinsured-motorist coverage was to "fill the gap between the claim and the tortfeasor’s insurance” and to prevent the insured from recovering amounts from the insurer over and above the coverage provided by the underinsured-motorist policy. Sulser, 147 Ill. 2d at 556. The court provided an example of how underinsuredmotorist coverage was to work, stating that if the insured recovered $50,000 through the tortfeasor’s insurance policy, he or she would be entitled to a payment of $50,000 under a $100,000 underinsured-motorist policy. Sulser, 147 Ill. 2d at 557. The court concluded that in enacting the underinsured-motorist statute, "the legislature avoided the absurdity of a situation where a policyholder would receive fewer benefits in the fortuitous event of being injured by an underirisured rather than by an uninsured motorist.” Sulser, 147 Ill. 2d at 557.
If the position of Country Mutual were to be adopted, this purpose would be frustrated. Under Country Mutual’s analysis, plaintiff could only receive $35,000 from the at-fault motorist who injured him. Cummins would be prevented from receiving payment of the $15,000 gap between his underinsured-motorist coverage and the tortfeasor’s liability coverage. However, if the liable driver who caused Cummins’ injuries had been completely uninsured, Cummins would be entitled to the full $50,000 individual limit of his uninsured-motorist policy. The very situation the legislature is trying to avoid would be realized under Country Mutual’s construction of section 143a — 2(4).
We agree with Sulser and the appellate court that it would be absurd to allow Cummins to receive fewer *485benefits after being injured by an underinsured driver rather than an uninsured driver. 281 Ill. App. 3d at 12. Sulser recognizes that the very purpose of underinsuredmotorist coverage is to cover the shortfall between the amount of insurance contracted for and the amount received from the liable driver. To achieve this purpose, motorists must be considered "underinsured” when the amount of liability insurance they actually pay out is less than the amount of underinsured-motorist coverage a policyholder obtains.
Further, in determining when coverage is appropriate, this court can also consider a policyholder’s reasonable expectations and the coverage intended by the insurance policy. See Hoglund v. State Farm Mutual Automobile Insurance Co., 148 Ill. 2d 272, 279 (1992). In this case, premiums were paid for $50,000 of underinsured-motorist coverage and plaintiff reasonably expected coverage for damages caused by an underinsured motorist up to that amount. In addition, Country Mutual’s insurance policy was intended to provide coverage for damages caused by an underinsured motorist and to place plaintiff in the same position as if the at-fault driver had adequate insurance. If Country Mutual’s interpretation of the underinsured-motorist policy were adopted, the underinsured-motorist protection contracted for would no longer be available. In effect, the policyholder would be denied substantial economic value in return for the premiums paid. See Hoglund, 148 Ill. 2d at 278.
The language and intent of the underinsuredmotorist statute, as well as the policyholder’s reasonable expectations, indicate coverage when there is a gap between the amount actually recovered from the liable motorist and the underinsured-motorist policy limit. We follow the statutory language and the legislative intent recognized by this court in Sulser and find that "under-*486insured” must be defined by comparing the amount of underinsured-motorist coverage to the amount of liability coverage actually recovered from the at-fault driver. To the extent that the amount of liability insurance actually recovered is less than the amount of underinsured-motorist coverage, the liable driver is considered underinsured.
Here, the limits of liability coverage were identical to the limits of plaintiff’s underinsured-motorist coverage, but plaintiff recovered less than the available limits. Plaintiff received $35,000 in a court-approved, good-faith settlement from the at-fault driver’s liability insurance. Plaintiff had a higher level of underinsured-motorist coverage in the amount of $50,000 per person and his damages exceeded this amount. Therefore, we hold that the at-fault driver was underinsured, and plaintiff is entitled to underinsured-motorist coverage. Under Sulser, plaintiff needs $15,000 to "fill the gap” between his underinsured coverage limits and the amount of liability insurance actually recovered. We conclude that, plaintiff is entitled to state a claim for $15,000 in underinsured-motorist benefits.
For the foregoing reasons, the judgment of the appellate court is affirmed.
Affirmed.