The plaintiff (Evans), a supplier of materials to D. J. Development Corporation (D. J.) for use in the construction of buildings, filed a notice of contract in the Barnstable County registry of deeds on July 26, 1974, as the first step in perfecting a materialman’s lien under G. L. c. 254, § 7, as appearing in St. 1973, c. 801, § 3. It is not disputed that the construction mortgages for these buildings had been recorded prior to the notice of contract. The plaintiff, not having been paid, brought an action against D. J. and the various mortgagees involved in financing the construction mortgages, including Vanguard Savings Bank (Vanguard), to which a number of the mortgages had been assigned, seeking: (1) a judgment in its favor for the amount due; (2) the establishment of a lien on the land and buildings, and a determination of the priority of that lien over advances by the mortgagees; and (3) sale of the real estate subject to the lien and application of the proceeds to the plaintiffs judgment. The plaintiffs subsequent motion to amend its complaint was denied by a judge of the Superior Court. Vanguard filed a motion for summary judgment under Mass.R.Civ.P. 56, 365 Mass. 824 (1974), which was allowed and a judgment was entered dismissing the action as to Vanguard. Contrast Caldwell v. Collier, 5 Mass. App. Ct. 903 (1977). On its appeal from that judgment Evans complains of (1) the denial of its timely motion to amend the complaint and (2) the allowance of Vanguard’s motion for summary judgment. See Mass.R.Civ.P. 54(b), 365 Mass. 821 (1974).
The plaintiffs proposed amendment would have alleged that at the time the plaintiff recorded its notice of contract the mortgagees had not unconditionally committed funds to D. J. and had advanced only a small portion of the total amount ultimately advanced by them, and that the lien of the plaintiff has priority over the recorded mortgages to the extent that funds not unconditionally committed were advanced following the recording of the notice of contract.
*3081. General Laws c. 254, § 7, as appearing in St. 1973, c. 801, § 3, provides that ”[n]o lien ... shall avail as against a mortgage actually existing and duly registered or recorded to the extent of the amount actually advanced or unconditionally committed prior to the filing or recording in the registry of deeds of the notice required by this chapter ....” It was held in Gray v. McClellan, 214 Mass. 92, 97 (1913), that where the mortgagee was not bound to make future advances and knew that buildings were to be constructed on the mortgaged lots and that mechanics were to perform labor on them (although the mortgagee did not know who the mechanics were and had no actual knowledge or notice of the claiming of liens or that the mechanics had not been paid), the mechanics’ liens were superior to sums disbursed after the mechanics began work.2 See also Waverley Co-op. Bank v. Haner, 273 Mass. 477, 480-481 (1930). Contrast Whelan v. Exchange Trust Co., 214 Mass. 121, 123 (1913). Therefore, if the amendment had been allowed, the complaint would have stated a claim upon which relief could have been granted.
*3092. As an answer to the complaint had already been filed, the judge had some measure of discretion in deciding whether to allow or deny the motion to amend. Mass.R.Civ.P. 15(a), 365 Mass. 761 (1974). Castellucci v. United States Fid. & Guar. Co., 372 Mass. 288 (1977). A motion to amend should be allowed unless there is some good reason to deny it; if it is denied, the record should show some reason, express or apparent, for the denial. Id. at 289-290. As no reason is apparent for denying the motion, we think it should have been allowed. Compare Jessie v. Boynton, 372 Mass. 293, 295 (1977).
3. Vanguard’s affidavit in support of its motion for summary judgment did not set out the terms of the construction mortgages or any facts from which a court could properly infer that the bank was unconditionally committed to make all the advances made following the filing of the plaintiff’s notice of contract. Thus Vanguard did not demonstrate that no genuine issue of material fact would exist under the amended complaint. Compare John B. Deary, Inc. v. Crane, 4 Mass. App. Ct. 719, 722 (1976). The judgment is reversed and the plaintiff is given leave to file an amended complaint.
So ordered.
Gray v. McClellan was decided under a previous statute, R. L. (1902) c. 197, § 5, which provided, "The lien shall not avail against a mortgage actually existing and duly recorded prior to the date of the contract under which the lien is claimed.” The language "to the extent of the amount actually advanced or unconditionally committed” was added by St. 1973, c. 801, § 3. The amendment may have broadened the number of situations in which a mechanic’s lien has priority over a previously recorded mortgage. (It has been held that a construction mortgage in which funds are advanced in installments as the building reaches various stages of completion is a conditional loan agreement under which a mortgagee is not obligated to advance funds after a builder stops work. Williams v. Whitinsville Sav. Bank, 283 Mass. 297, 299-300 [1933]). We note also that §§ 4 and 5 of St. 1973, c. 801, provided a clarification of St. 1972, c. 774, which was entitled "An Act expediting payments to general contractors and to subcontractors and improving the flow of funds in the construction industry.”) Whether or not this is the case, the amendment clearly did not narrow the instances where a lien has priority over a previously recorded mortgage.