OPINION OF THE COURT
Callahan, J.On October 4, 1972 the State of New York (State) entered into a highway construction contract with Suburban Excavators, Inc. (Suburban) to construct 4.38 miles of the Southern Expressway with bridges and access roads, having a completion date of June 11, 1975. Pursuant to the terms of that contract (DOT No. D 62652) Suburban posted separate performance and payment bonds furnished by the Aetna Casualty and Surety Co. (Aetna/Surety). In December, 1972 Suburban, with the consent of the State, contracted with Northeastern Bridge, Inc. (Northeastern) to perform a portion of the project for which Northeastern was to receive $1,788,141. Northeastern employed Lake Steel Erection, Inc. (L. S. Erection) to erect steel for the bridges and roads and utilized the services and heavy equipment of Lake Steel Equipment Rental, Inc. (L. S. Equipment). Both Lake Steel corporations completed their work on November 8, 1974.
Suburban encountered financial difficulties. When it failed to timely pay subcontractors and materialmen, numerous mechanics’ liens were filed against the project. On April 28, 1975 each of the Lake Steel corporations filed separate mechanics’ liens; L. S. Erection in the amount of $47,342.41; L. S. Equipment for the sum of $12,536.34. These liens were discharged by undertakings provided by Aetna; a $51,000 bond on the lien of L. S. Erection; a $14,000 bond ón the lien of L. S. Equipment. The discharge *148orders and undertakings were filed with the Office of the New York State Comptroller (Comptroller) on May 9, 1975.
In May, 1975, John S. MacNeill, another subcontractor, commenced an action to foreclose a mechanic’s lien he had filed against the project on December 16, 1974. This lien had also been discharged by court order pursuant to subdivision 5 of section 21 of the Lien Law, and an undertaking furnished by Aetna. Suburban, Aetna, L. S. Erection, the State and Genesee Valley Nurseries, Inc., were all named as defendants in this action. MacNeill filed a lis pendens with the Comptroller on May 15, 1975.
In April, 1976 Tri-City Electric Co., Inc. (Tri-City) commenced an action on its lien filed on October 22,1975. The Tri-City action named the State, Suburban, MacNeill, L. S. Erection, L. S. Equipment, Northeastern, Tonio Contractors, Inc., and others as party defendants. The MacNeill and Tri-City actions were consolidated for trial by order of the Supreme Court on October 20, 1978.
The trial which commenced on September 29, 1981, concerned only the claims of the L. S. corporations and Tonio. At trial defendants moved to amend their pleadings to include a cause of action to enforce a trust under the provisions of article 3-A of the Lien Law. Upon completion of the nonjury trial the court (1) upheld the mechanics’ liens of defendants L. S. Erection, L. S. Equipment and Tonio, (2) declared moneys presently held and retained by the Comptroller to be a trust fund to be applied to the payments of the mechanics’ liens, (3) held that Aetna as completing surety on this public improvement, pursuant to its performance bond with the State and also as surety upon the respective bonds pursuant to section 21 of the Lien Law, is liable for the payment of the liens of L. S. Erection, L. S. Equipment and Tonio and that all moneys earned by Aetna in completion of the contract constituted a trust fund under article 3-A of the Lien Law, (4) granted L. S. Erection a judgment in the sum of $47,342 plus interest and costs in the total sum of $71,625.77, (5) granted L. S. Equipment judgment against Aetna in the sum of $12,536.34 together with interest and costs in the total sum of $18,981.65, and (6) denied the Lake Steel *149corporations a personal judgment against the State. Since the entry of judgment the claims of Tonio have been resolved.
The mechanic’s lien statute is a remedial one and is to be liberally construed to carry out the purpose of its enactment (Alyea v Citizens’ Sav. Bank, 12 App Div 574, affd 162 NY 597). Section 23 of the Lien Law provides that “[tjhis article is to be construed liberally to secure the beneficial interests and purposes thereof. A substantial compliance with its several provisions shall be sufficient for the validity of a lien and to give jurisdiction to the courts to enforce the same.” This rule of liberal construction is not without limit however and does not authorize judicial legislation to enlarge the clearly defined scope of purpose of the Lien Law (Raymond Concrete Pile Co. v Federation Bank & Trust Co., 288 NY 452, on rearg 290 NY 611). The Lien Law should be construed as giving no other legal or equitable relief to those who fail to use the remedies given. Notwithstanding that an undertaking has been given for the discharge of a lien, an action to enforce such lien is equitable not legal in nature (Morton v Tucker, 145 NY 244).
It is essential to the resolution of the conflicting claims herein that the distinct characteristics of the funds and the separate bonds provided by Aetna be applied. The lien fund or moneys appropriated for the completion of the project should not be confused with the statutory trust fund concept (Lien Law, art 3-A). Generally in public improvement contracts the contractor is required to secure the performance of his contract, and also to secure payment of the claims of subcontractors, materialmen and laborers thereunder (see Highway Law, § 38, subd 6; § 52; State Finance Law, §§ 136, 137). All State highway contracts require a performance bond under section 38 of the Highway Law. This is to insure the State that a contract will be completed for the amount appropriated for that improvement. Upon default by a contractor the surety completes the contract, at its own cost and expense, and becomes equitably subrogated to the same rights as the contractor has in and to the unpaid balance of the contract price (State Bank v Dan-Bar Contr. Co., 23 Misc 2d 487, affd 12 AD2d 416, affd 12 NY2d *150804). The payment bond on the other hand runs to the State as obligee, in order that the policy of the State that those for whose benefit the bond is exacted, shall be paid in full, without regard to the status of what may be due the contractor under the contract or what may be due to the State, from the surety, under the performance bond (State Bank v Dan-Bar Contr. Co., supra, pp 490-491). The remedy on the payment bond is in the nature of a third-party beneficiary recovery. It is dependent neither on the existence of a lien fund or a Lien Law trust fund for its utilization or enforcement. We are not concerned here, however, with the rights and remedies under the payment bond inasmuch as no action pursuant to section 137 of the State Finance Law was pursued in this record.
It is significant to note that upon the posting of the various bonds, a “shifting” occurs and the lien detaches from its original adherence (appropriated funds or property) and attaches to the substitute, the bond. A surety obligation is then substituted (Morton v Tucker, supra; Matter of Brescia Constr. Co. v Walart Constr. Co., 238 App Div 360, 363). This change is wrought by the statute, independently of the will of the lienor, or of any action or failure to act on his part (Yonkers Bldrs. Supply Co. v Luciano & Son, 269 NY 171, 178 [Lehman, J., concurring]). Nevertheless, to justify payment out of the fund to which the lien has been “shifted”, a valid lien must first be judicially established on the primary fund (MillikenBros. v City of New York, 201 NY 65; Matter of Cooper v Emmanuele, 25 AD2d 809). The undertaking filed to discharge the lien never admits validity or timely filing of the lien (Parsons v Moses, 40 App Div 58).
The liens filed by L. S. Erection and L. S. Equipment terminated automatically on October 28, 1975 unless a foreclosure action was commenced within that time period and a notice of pendency of such action filed with the Comptroller or a court order was obtained continuing the liens (Lien Law, § 18). Here no orders were ever obtained continuing the liens nor was a lis pendens ever filed by either Lake Steel corporation. However, L. S. Erection was named a party defendant in the MacNeill foreclosure action in which a notice of lis pendens had been filed with the *151Comptroller. This, in effect, saved the rights of L. S. Erection without its having filed a separate notice of pendency of the action (Lien Law, § 18; Berger Mfg. Co. v City of New York, 206 NY 24). The fact that L. S. Equipment was named a party defendant in the Tri-City action, which was then consolidated for trial with the MacNeill action, does not revive the lien of L. S. Equipment. Failure to file a lis pendens or obtain an order continuing the lien within the prescribed period is a fatal omission (Lien Law § 21, subd 2, par [a]; Walker v Buffalo Elec. Constr., 83 AD2d 768, affd 55 NY2d 843). Once lapsed, it is not revived by the subsequent action (Brockhurst Co. v City of Yonkers, 270 NY 459).
The State concedes that the Comptroller has funds appropriated for completion of this project which are unpaid on the contract with Suburban. We note that in a collateral appeal (Aetna Cas. & Sur. Co. v State of New York, 85 AD 2d 784, 785) that “[plrior to Suburban’s default, [the State] had certified that $256,799.41 was due on Contract No. D 62652.” The testimony and evidence adduced at trial adequately support the trial court’s determination that there were funds due Northeastern by Suburban on April 28,1975 in excess of the subject liens. Since the lien of L. S. Erection did not lapse, Aetna is liable on the judgment in favor of L. S. Erection, but only to the extent of its undertaking, to wit: $51,000 (McClendon Blacktop Co. v Johnson-Bldg. Co., 46 AD2d 724). Inasmuch as the lien of L. S. Equipment lapsed pursuant to section 18 of the Lien Law, the judgment granted in its favor for the sum of $18,981.65 should be vacated.
The court did not err in granting Lake Steel corporations’ motion at trial to amend their pleadings to include a cause of action under the trust fund provisions of article 3-A of the Lien Law. This action is not barred as the amendment relates back to the original pleadings, which were served in 1975 and 1976 (CPLR 203, subd [e]). The argument that the amendment was not proper in that it was not properly pursued in the required form of a representative action (Lien Law § 77, subd 1), is well taken. However, such an action need not fail, solely because it was not brought in the form of a class action (CPLR 103, 3013, *1523017, 3025; Dittmar Explosives v A.E. Ottaviano, Inc., 20 NY2d 498; Scriven v Maple Knoll Apts., 46 AD2d 210, 215).
Funds appropriated for the payment of this public improvement but which are unpaid and held by the Comptroller are not trust funds pursuant to article 3-A of the Lien Law (Fehlhaber Corp. v Levitt, 64 Misc 2d 495, 497). Strictly construed, the language of the statute indicates that the lien attaches to the amount due under the contract between the State and Suburban (Lien Law, § 5). Dealing with public improvements, the statute renders the trust provisions applicable to funds received: (a) by a contractor in connection with a contract; or (b) a subcontractor under, or in connection with, a subcontract made with a contractor for such public improvement. In either case, a right of action for such funds due or earned, or to become due or earned, constitutes assets of the statutory trust. When a surety completes a contract for a defaulting contractor it becomes subrogated to its rights in the unpaid balance of the contract. So Aetna stands in the shoes of Suburban and all moneys which it may have earned in completing the improvement are applicable to the claims of the subcontractors, who performed under their contract for the improvement of this project (Carpenter’s Backhoe & Dozer Serv. v Dewittsburg Housing Dev. Fund Corp., 66 AD2d 916; Wilson v Moon, 240 App Div 440, affd 265 NY 640). Aetna has no beneficial interest in the moneys due or to become due from the funds appropriated on the contract, or from any profits realized until such time as all subcontractors and other statutory beneficiaries have been paid (Aquilino v United States, 10 NY2d 271, 281-282). As a matter of fact, a statutory beneficiary of the fund produced by the improvement to which they have contributed has an interest which is protected whether or not any notice of lien was filed (American Blower Corp. v James Talcott, Inc., 18 Misc 2d 1031, affd 11 AD2d 654, affd 10 NY2d 282). A discharge of the lien only operates to relieve the Comptroller of liability (Lien Law, § 21, subd 3-a).
L. S. Equipment is a beneficiary under the statute as to trust assets, if any, regardless of whether or not it has a valid mechanic’s lien or reduced its claim to judgment (Lien Law, § 71, subd 4). Each such trust claim is deemed *153to originate at the time of making the contract or the occurrence of the event out of which it arises (Lien Law, §71, subd 5). But until such funds are actually received, there is neither a trust res or a trust. The trial court did not determine what funds now held by the Comptroller after payment of other claims (see Aetna Cas. & Sur. Co. v State of New York, supra) are available, nor compute the profits earned by Aetna on completion of the contract.
Accordingly, this matter must be remitted to the trial court to (1) comply with subdivision 1 of section 77 of the Lien Law and (2) determine the amount of the fund available for payment of the balance due L. S. Equipment for its cost of the improvement.
On remittitur, the court should (1) direct Aetna to comply with the subpoena served before trial of this action and (2) not assess interest to the amount of the claim of L. S. Equipment. Trust claims pursuant to article 3-A of the Lien Law are allowed only for the “cost of improvement” (Lien Law, § 71, subd 1; Northern Structures v Union Bank, 57 AD2d 360).
Dillon, P. J., Green, O’Donnell and Schnepp, JJ., concur.
Judgments and order unanimously modified, and as modified affirmed, without costs, and matter remitted to Supreme Court, Erie County, for further proceedings, in accordance with opinion by Callahan, J.