
711 N.E.2d 1146 (1999)
305 Ill. App.3d 234
238 Ill.Dec. 485
PETROLINE COMPANY, an Illinois Corporation, Plaintiff-Appellant,
v.
ADVANCED ENVIRONMENTAL CONTRACTORS, INC., an Illinois Corporation; Yong Choi and Kil Jee Choi, Husband and Wife; Shui L. Chow; Crush-al Inc.; Highland Tank and Manufacturing Co., a Pennsylvania Corporation; H.J. Mohr and Sons, an Illinois Corporation; Unknown Owners and Non-record Claimants, Defendants-Appellees.
No. 1-98-2026.
Appellate Court of Illinois, First District, Second Division.
April 27, 1999.
Rehearing Denied June 23, 1999.
*1147 Claudette A. Loiacono, Des Plaines, for appellant.
Tami J. Reding-Brubaker, of Frank, Miller, Melamed & Tabis, P.C., Chicago, for appellees.
Justice COUSINS delivered the opinion of the court:
The plaintiff subcontractor was hired to provide equipment that was to be installed on a piece of property owned by defendants in this case. The subcontractor was not fully paid, so it filed a mechanic's lien against the property. It provided 90 day's notice to the owners under section 24 of the Mechanics Lien Act (770 ILCS 60/24 (West 1996)), but did not provide such notice to the mortgagee (whose interest was recorded).
The subcontractor filed suit against the owners to foreclose the lien within the statutory limitations period. The trial court dismissed the action, however, on the basis that the subcontractor's failure to give the mortgagee 90 day's notice prevented the formation of an enforceable lien.
The subcontractor appealed, arguing that the lack of notice to the lender only made the lien unenforceable against the lender, not unenforceable against the owners.
We reverse and remand.

BACKGROUND
In 1993, defendants Yong Choi and Kil Jee Choi (owners) bought a piece of property on North Cicero Avenue. They financed the purchase by mortgaging the property to defendant Shui Chow (lender). The purchase and the mortgage were promptly recorded.
The owners hired defendant Advanced Environmental Contractors, Inc. (contractor), to install underground petroleum storage tanks and other equipment on the property. The contractor bought equipment from the plaintiff, Petroline Co. (subcontractor). The subcontractor completed delivery on November 17, 1994. At this time, $14,107.25 of the $63,499.00 bill remains unpaid.
*1148 The subcontractor served a 90 day's notice on the owner that it was filing a mechanic's lien, as required by section 24 of the Mechanics Lien Act (the Act), which provides in pertinent part:
"Sub-contractors, or party furnishing labor or materials may at any time after making his or her contract with the contractor, and shall within 90 days after the completion thereof * * * cause a written notice of his or her claim and the amount due or to become due thereunder, to be sent by registered or certified mail, with return receipt requested, and delivery limited to addressee only, to or personally served on the owner of record or his agent or architect, or the superintendent having charge of the building or improvements and to the lending agency if known[.]" 770 ILCS 60/24 (West 1996).
The subcontractor did not, however, give notice to the lender.
The subcontractor recorded its lien within four months of delivery of the equipment and then filed suit to foreclose the lien (along with other relief) within two years of delivery as required by section 7 of the Act. 770 ILCS 60/7 (West 1996). Both the contractor, who had filed in bankruptcy, and the lender were joined as defendants.
The subcontractor's initial complaint had three counts: mechanic's lien foreclosure, an action at law under section 28 of the Act, and quantum meruit. The trial court struck the second count with leave to replead and dismissed the third count without prejudice. The subcontractor then filed a first amended complaint for mechanic's lien foreclosure. The court dismissed this complaint on the motion of the owners because the subcontractor had not provided section 24 notice to the lender. The court denied a motion to reconsider, explaining that "[p]laintiffs were unable to plead notice on owner and lender or allege facts to obviate the need to serve such notice." The court then certified the issue for interlocutory review pursuant to Supreme Court Rule 304(a) (134 Ill.2d R. 304(a)).
The subcontractor now appeals, arguing that its failure to give the lender section 24 notice only means that its lien cannot have priority over the mortgage, not that the lien cannot be enforced against the owners.

ANALYSIS
The paramount objective in construing a statute is to give effect to the intent of the legislature. People ex rel. Nelson v. Olympic Hotel Building Corp., 405 Ill. 440, 444, 91 N.E.2d 597, 599 (1950). In order to determine legislative intent, courts construe a statute as a whole. Pliakos v. Illinois Liquor Control Comm'n, 11 Ill.2d 456, 459-60, 143 N.E.2d 47, 49 (1957). The purpose of the legislature should be gathered from the entire statute rather than any particular section of it. People ex rel. Nelson, 405 Ill. at 444, 91 N.E.2d at 599.
We analyze this case keeping in mind that the purpose of the Mechanics Lien Act is "to protect those who in good faith furnish material or labor for the construction of a building." Norman A. Koglin Associates v. Valenz Oro, Inc., 277 Ill.App.3d 142, 146, 213 Ill.Dec. 625, 659 N.E.2d 971, 975 (1995). In particular, the mechanic's lien provisions concerning subcontractors "are designed to ensure that subcontractors will have some recourse against the ultimate beneficiaries of the subcontractors' laborsthe project ownerif the general contractor fails to meet its obligations to the subcontractor." S.J. Groves & Sons Co. v. Midwest Steel Erection Co., 666 F.Supp. 129, 131 (N.D.Ill.1986).
Certain of the portions of the Act relevant to this case apply to both contractors and subcontractors. For example, the Act requires that a lien be recorded, or suit be filed, within four months of the work done if the lien is to be effective against third parties. 770 ILCS 60/7 (West 1996). There is a two-year limitations period for suits under the Act. 770 ILCS 60/9 (West 1994). The Act requires that interested parties be joined in a suit to foreclose a lien. 770 ILCS 60/11 (West 1996). If the contract on which a lien is based is entered into prior to the recording of a mortgage, it takes priority over the mortgage. 770 ILCS 60/1 (West 1996). But if the mortgage is recorded before the contract and there is a deficiency, a special procedure is followed. The court calculates what percent of the value of the land was present before the contract and what percent *1149 of the value was added by the improvements. For instance, perhaps the value was $4,000 before the contractor's work and $5,000 afterwards, but the foreclosure sale only nets $3,000. The mortgagee's claim is preferred to 80% of the money from the foreclosure sale, i.e., $2,400. The lienholder's claim is preferred to 20% of the money from the sale, i.e., $600. 770 ILCS 60/16 (West 1996). See generally Moulding-Brownell Corp. v. E.C. Delfosse Construction Co., 304 Ill.App. 491, 26 N.E.2d 709 (1940).
Other important provisions apply only to subcontractors. Section 21 of the Act allows subcontractors to file mechanic's liens and discusses prerequisites for the formation of such a lien. 770 ILCS 60/21 (West 1996). 90 day's notice must be given to the owner and to the lender, if known. 770 ILCS 60/24 (West 1996). Subcontractors may sue the contractor and owner jointly under section 28. 770 ILCS 60/28 (West 1996). Under the "relation back doctrine," a subcontractor's lien complying with the provisions of the Act is considered to have attached as of the date of the contract between the contractor and the owner. Pittsburgh Plate Glass Co. v. Kransz, 291 Ill. 84, 125 N.E. 730 (1919).
The precise question of whether the failure to provide timely notification to a lender of a lien under section 24 renders a lien invalid as to parties other than the lender is an issue of first impression in Illinois. A bankruptcy court in Minnesota considered the question but could only conclude that "[t]he impact of such failure, however, is unclear under Illinois law." Stoebner v. Horizon Fabricators, Inc., 153 B.R. 840, 850 (D.Minn.1993).
Section 24 of the Act, which was added in 1969, directs lien claimants to provide 90 day's notice of the lien to "the lending agency, if known." 770 ILCS 60/24 (West 1996). The phrase "if known" has been held to be mean "if discoverable by the subcontractor through searching title recording records." Hill Behan Lumber Co. v. Irving Federal Savings & Loan Ass'n, 121 Ill. App.3d 511, 514, 76 Ill.Dec. 931, 459 N.E.2d 1066, 1069 (1984). That is to say, a subcontractor has constructive knowledge of a mortgagee whose interest is properly recorded.
In support of its contention that failure to provide notice to a lender completely invalidates a lien, the defense cites Hill Behan Lumber Co. v. Irving Federal Savings & Loan Ass'n, 121 Ill.App.3d 511, 76 Ill.Dec. 931, 459 N.E.2d 1066 (1984). In Hill Behan Lumber, a subcontractor holding a mechanic's lien and a mortgagee were both attempting to foreclose on a piece of property. The trial court dismissed the subcontractor's claim as to the mortgagee, since the subcontractor did not give section 24 notice to the lender, of which it had constructive notice. The appellate court affirmed this portion of the decision ruling that, since the subcontractor failed to give the lender section 24 notice, it did not state a cause of action against the lender. Hill Behan Lumber, 121 Ill.App.3d at 518, 76 Ill.Dec. 931, 459 N.E.2d at 1072. While Hill Behan Lumber is certainly relevant to this case, it does not address the enforceability of the lien against the owner.
Almost every case dealing with the Act states that the Act is in derogation of the common law and must, therefore, be strictly construed. See, e.g., Watson v. Auburn Iron Works, Inc., 23 Ill.App.3d 265, 273, 318 N.E.2d 508, 514 (1974). The owners contend that the rule of strict construction mandates the conclusion that any deviance from the procedure outlined in section 24 will serve to invalidate the lien. Section 39 of the Act, however, provides that the Act "is and shall be liberally construed as a remedial act." 770 ILCS 60/39 (West 1996). Courts have reconciled these two precepts by holding that the rule of strict construction applies to the requirements upon which the right to a lien depends but that, once a lien has properly attached, liberal construction applies. Watson, 23 Ill.App.3d at 273, 318 N.E.2d at 514. Thus, in order to know whether to apply strict or liberal construction, we must determine whether 90 day's notice to the mortgagee was intended to be a requirement upon which the right to a lien depends.
The purpose of the strict notice requirements of section 24 is to prevent owners from being forced to pay subcontractors for labor or materials for which they have already paid the contractor. Scherer Hardware & Supply, Inc. v. Charles H. Eichelkraut *1150 & Son, Inc., 9 B.R. 125, 130 (Bankr. N.D.Ill.1981); Cohen v. Bernstein, 170 Ill. App. 113 (1912). Partly because of the danger of this type of surprise, courts have called notice to the owner the "very substance of the basis on which a mechanic's lien may be predicated." Roth v. Lehman, 1 Ill.App.2d 94, 97, 116 N.E.2d 413, 414 (1953).
Nevertheless, when the owner receives actual notice and his or her rights are protected, courts have been willing to overlook minor formal deficiencies. In Watson, where the owner received actual notice, the court found the notice to be effective under section 24 even though it was not addressed "delivery limited to addressee only" as provided in the Act. Watson, 23 Ill.App.3d at 273, 318 N.E.2d at 514. Similarly, in A.Y. McDonald Manufacturing Co. v. State Farm Mutual Automobile Insurance Co., 225 Ill.App.3d 851, 167 Ill.Dec. 354, 587 N.E.2d 623 (1992), a subcontractor filing a lien provided notice to the owner by regular mail rather than certified mail. The court nevertheless held that the lien was enforceable against the owner, in view of the fact that the owner acknowledged receiving actual notice. The court, quoting Matthews Roofing Co. v. Community Bank & Trust Co., 194 Ill.App.3d 200, 205, 141 Ill.Dec. 143, 550 N.E.2d 1189, 1193 (1990), stated:
"`Illinois courts have interpreted the strict requirements of notice by examining how effectively a party did in fact notify the other side rather than simply basing rights solely on whether every phase of the statute was followed in exact detail.'" A.Y. McDonald, 225 Ill.App.3d at 857, 167 Ill. Dec. 354, 587 N.E.2d at 627.
In our view, if the owner receives actual notice that otherwise complies with section 24, lack of notice to the mortgagee is, from the perspective of the owner, a minor deficiency. The owner's rights are not prejudiced. Failure to notify the mortgagee does not enhance the danger that the owner will have to pay twice. Accordingly, we hold that notice to the mortgagee is not a requirement upon which the right to a lien against the owner depends.
On this issue, an instructive case is Liese v. Hentze, 326 Ill. 633, 158 N.E. 428 (1927). In Liese, a subcontractor sued to foreclose a lien against property owned by joint tenants. However, the subcontractor only gave notice to one of the joint tenants. The court ruled that the lien was enforceable against the interest of the owner who had received notice, but not against the interest of the owner who had not received notice. Liese, 326 Ill. at 637-38, 158 N.E. at 430.
Further, Illinois cases dealing with section 7 of the Act have held consistently that the failure of a contractor or subcontractor to take a required step providing notice to other creditors may make the lien unenforceable as to those creditors, but not as to the owner. See, e.g., Moore v. Parrish, 50 Ill.App. 233, 235 (1893); F.E. Schoenberg Manufacturing Co. v. Broadway Central Hotel Corp., 259 Ill.App. 40, 42 * * * (1930); Apollo Heating & Air Conditioning Corp. v. American National Bank & Trust Co., 135 Ill.App.3d 976, 979, 90 Ill.Dec. 711, 482 N.E.2d 690, 693 (1985).
Section 7 of the Act provides, in pertinent part:
"No contractor shall be allowed to enforce such lien against or to the prejudice of any other creditor or incumbrancer or purchaser, unless within 4 months after completion * * * he or she shall either bring an action to enforce his or her lien therefor or shall file in the office of the recorder of the county in which the building, erection or other improvement to be charged with the lien is situated, a claim for lien * * *. Such claim for lien may be filed at any time after the contract is made, and as to the owner may be filed at any time after the contract is made and within 2 years after the completion of the contract[.]" 770 ILCS 60/7 (West 1996).
Given the differences in the language between section 7 and section 24, the above cases are not controlling; nevertheless, the reasoning of these cases is instructive.
In each of the above-mentioned section 7 cases, an owner attempted to defend against foreclosure of a mechanic's lien on the grounds that the contractor or subcontractor had not recorded the lien or filed suit within four months. The courts rejected this defense. *1151 Moore, for example, discussing a section of the previous statute that is substantially the same as section 7 (see 1887 Laws 219 §§ 4, 28) held that "[t]he principal debtor can not, for his own protection, invoke a defense which is peculiar to [third parties]." Moore, 50 Ill.App. at 236. As between the owner and the contractor, "it was immaterial whether the statement was made in compliance with the statute." Moore, 50 Ill.App. at 235. The court explained:
"We are unable to see wherein the finding of the statement required by [the predecessor to section 7] can serve any good purpose as between the original contractor and the principal debtor, and we can not suppose that the legislature intended to require a useless thing to be done." Moore, 50 Ill.App. at 235.
So too in this case, from the perspective of the owners, it was immaterial whether the mortgagee was notified. The owners' rights are not prejudiced.
Of course, the requirement of 90 day's notice to the mortgagee is designed to protect the mortgagee. But the mortgagee's rights also are not affected. For if, on the one hand, the mortgagee is made a party, Hill Behan Lumber holds that the lienholder's failure to provide section 24 notice to the lender makes the lien unenforceable against the lender. Hill Behan Lumber, 121 Ill. App.3d at 518, 76 Ill.Dec. 931, 459 N.E.2d at 1072. And if, on the other hand, the mortgagee is not made a party, it remains the case that his or her interest in the property is not affected.
"In construing this act, the court has laid down the rule that all persons in interest may and should be made parties; [citation] and the rights of those not made parties are not affected by the decree, or any proceedings under it * * *.
He must stand therefore before us, as if no decree had ever been rendered in the case; even had the lien been prior in date to the mortgage." Williams v. Chapman, 17 Ill. 423, 424 (1856).
See also Interstate Electrical Supply Co. v. Contractors & Engineers, Inc., 149 Ill.App.3d 1080, 1085, 103 Ill.Dec. 549, 501 N.E.2d 866, 869-70 (1986) (lien claimant's action to foreclose, without including other known creditor, did not serve to extinguish other creditor's interest). Accordingly, the mortgagee's interests also are not prejudiced by our holding that failure to provide 90 day's notice to the lender only makes the lien unenforceable as to the lender.
A contrary rule would frustrate the purpose of the mechanic's lien statute as a whole "to protect those who in good faith furnish material or labor for the construction of a building" (Koglin v. Valenz, 277 Ill.App.3d at 146, 213 Ill.Dec. 625, 659 N.E.2d at 975), without advancing the purpose of section 24.
For the foregoing reasons, we reverse the judgment of the trial court and remand the case for further proceedings.
Reversed and remanded.
GORDON, P.J. and McNULTY, J. concur.
