Appeal from an order of the Supreme Court (Dawson, J.), entered January 4, 2005 in Essex County, which denied plaintiffs motion for summary judgment and granted a cross motion by defendant RLI Insurance Company for summary judgment dismissing the complaint against it.
Defendant Mark J. MacDonald Plumbing & Heating, Inc. (hereinafter MacDonald), the general contractor on a public improvement contract with defendant Keene Central School District (hereinafter KCSD), hired plaintiff as a subcontractor. After performing the subcontract, plaintiff claimed that it had not been paid and filed a lien pursuant to Lien Law § 5. At MacDonald’s behest, defendant RLI Insurance Company (hereinafter defendant) provided a surety bond in the amount of plaintiffs claim to release the lien. Plaintiff then commenced this action, alleging claims against defendant, MacDonald and KCSD. When plaintiff subsequently moved for summary judgment against defendant on the surety bond, defendant cross-moved for summary judgment dismissing plaintiff’s claim against it. Finding that plaintiff’s complaint did not state a cause of action to foreclose the lien, Supreme Court denied plaintiff’s motion and granted defendant’s cross motion. Plaintiff appeals and we reverse.
Defendant emphasizes the argument that plaintiff failed to properly file its notice of lien, and plaintiff does not dispute that the notice was sent to the president of KCSD’s board of education only, and not to its treasurer. We agree with plaintiff, however, that despite its failure to strictly comply with Lien Law § 12, the Lien Law will be liberally construed “to secure the beneficial interests and purposes thereof’ (Lien Law § 23). Inasmuch as the notice of lien was filed with a principal officer of KCSD, actually received by the owner of the public improvement and treated as valid thereafter, we find that plaintiff substantially complied with Lien Law § 12 and the filing was effective (see C.R.A. Inc. of N. N.Y. v J & K Plumbing & Heating Co., 6 AD3d 915, 915 [2004]).
We also agree with plaintiff that it sufficiently pleaded a cause *1149of action to enforce its lien. It is well settled that the complaint is to be liberally construed on a motion to dismiss for failure to state a cause of action, whether pursuant to CPLR 3211 or 3212 (see CPLR 3026; Johnson City Cent. School Dist. v Fidelity & Deposit Co. ofMd., 263 AD2d 580, 581-582 [1999]). Our task is to determine whether the plaintiff has a cause of action, rather than whether one has been stated (see Leon v Martinez, 84 NY2d 83, 88 [1994]; Gagnon v City of Saratoga Springs, 14 AD3d 845, 846 [2005]). Here, the complaint, as amplified by the affidavits submitted by plaintiff, adequately describes the lien and the underlying public improvement contract, establishes plaintiff’s performance of the work under that contract, the lien’s initial filing and its continuing validity, and asserts that the lien has not been paid or otherwise satisfied. These are more than the minimum facts necessary to constitute an equitable action to enforce a lien (see Lien Law § 42; Entenman v Anderson, 106 App Div 149, 150 [1905]). Significantly, defendant does not dispute them.
Accordingly, we find that plaintiffs motion for summary judgment should have been granted. Defendant raised no question of fact as to any of the elements of plaintiffs claim, while the proof presented by plaintiff established its entitlement to relief against defendant on the bond.
Mercure, J.P., Peters, Mugglin and Kane, JJ., concur. Ordered that the order is reversed, on the law, with costs, defendant’s cross motion denied, plaintiffs motion granted and summary judgment awarded to plaintiff foreclosing the lien against the bond provided by defendant.