The defendants appeal from a judgment against them as principal and surety respectively in a proceeding brought by the plaintiff subcontractor under G. L. c. 149, § 29, to collect the balance due it on a public works project. This appeal concerns only the question whether the judge’s allowance of the claimant’s legal fees was proper. The defendants argue that that portion of G. L. c. 149, § 29, set forth in the margin,2 which permits a successful claimant to recover reasonable legal fees, is unconstitutional. They claim that they are denied equal protection of the laws because § 29 grants legal fees only to a successful claimant. They argue further that the refer*663ence in § 29 to recommended fee schedules of bar associations renders § 29 void because such fee schedules violate the antitrust laws of the United States. Additionally, the defendants argue that, even if § 29 is valid, they were improperly denied discovery and a hearing on the reasonableness of the legal fees allowed. We granted the defendants’ application for direct appellate review. There was no error.
1. The allowance of reasonable legal fees to a successful claimant under G. L. c. 149, § 29, but not to a successful defendant, does not violate the equal protection clause of the Fourteenth Amendment to the Constitution of the United States or similar provisions of the Constitution of the Commonwealth. We pass by the unargued question whether unsuccessful defendants, such as these defendants, have any standing to challenge the absence of a provision allowing reasonable legal fees to successful defendants. See Broadrick v. Oklahoma, 413 U.S. 601, 610 (1973).
The question for decision is whether the defendants have met their heavy burden of showing that the classification of litigants made by § 29 does not rationally further a legitimate State purpose. Commonwealth v. Petralia, ante, 452, 455 (1977). Zayre Corp. v. Attorney Gen., ante, 423, 432-433 (1977). The defendants concede that a statute is not repugnant to equal protection requirements simply because legal fees are allowed only to successful claimants. See Old Colony R.R. v. Assessors of Boston, 309 Mass. 439, 447 (1941); Ahmed’s Case, 278 Mass. 180,189-194 (1932); Life & Cas. Ins. Co. v. McCray, 291 U.S. 566, 569-570 (1934); Dohany v. Rogers, 281 U.S. 362, 368 (1930); Chicago & Northwestern Ry. v. Nye Schneider Fowler Co., 260 U.S. 35, 43-45 (1922); Missouri, Kan. & Tex. Ry. v. Cade, 233 U.S. 642, 650 (1914). They argue, however, that the distinction made in § 29 is arbitrary because it lacks any rational basis in the circumstances of this case. We disagree.
There is ample justification for the legislative determination, expressed in § 29, to allow reasonable legal fees to successful claimants and not to successful defendant contractors and sureties. The encouragement of prompt pay*664ment of general contractors’ obligations to subcontractors and materialmen is a substantial object of § 29. In LaBonte v. White Constr. Co., 363 Mass. 41, 45 (1973), a case involving each of the defendants before us in this case, we noted that § 29 is a remedial statute which should be construed broadly to achieve the purpose of affording security to subcontractors and materialmen on public works. Prompt payment of subcontractors on public works is a consistent legislative purpose. See G. L. c. 30, § 39F (1). The provision in § 29 concerning the allowance of reasonable legal fees to successful claimants was added by St. 1972, c. 774, § 5. The heading of that act is instructive in identifying its legislative purpose: “An Act expediting payments to general contractors and to subcontractors and improving the flow of funds in the construction industry.” Plainly, a provision which places the expense of litigation on a contractor and a surety who decline to pay a rightful claim tends to achieve the legislative goal of expeditious payments to subcontractors. Moreover, such a provision may encourage subcontractors to bid on public works projects and tends to alleviate concerns of subcontractors which might prompt higher bids as a precaution against unreasonable delays in the flow of funds to them. The defendants have failed to establish that the legislative classification lacks a rational basis.
2. The defendants next argue that G. L. c. 149, § 29, is unlawful because it directs the judge, in determining counsel fees, to consider bar association schedules of recommended fees. The claim is that recommended fee schedules violate the Federal antitrust laws and that any statute is void which prescribes such fee schedules as a measure of the minimum level of reasonableness of a fee. There is no indication that the judge considered any bar association fee schedule or, indeed, that there was any recommended bar association fee schedule applicable in the circumstances. Section 29 does not mandate that there be bar association recommended fee schedules but only that, if there are such schedules, they must be considered. If the recommended fee schedules do violate the antitrust laws, *665a point we need not consider,3 the over-all legislative goal of allowing reasonable legal fees can be achieved by severing and disregarding any reference to unlawful fee schedules. See DelDuca v. Town Adm’r of Methuen, 368 Mass. 1, 13 (1975), and cases cited. Here, in any event, there was no showing that there was any recommended fee schedule applicable in the circumstances. Thus, the judge could not have considered an allegedly unlawful recommended fee schedule. Clearly, § 29 is not void in its entirety simply because it refers to recommended minimum fee schedules of bar associations.4
3. Finally, the defendants argue that they were improperly denied their right to discovery and their right to an evidentiary hearing concerning the reasonableness of the legal fees allowed by the judge. After a master’s report was filed, the plaintiff moved for confirmation of that report and for entry of judgment. An accompanying affidavit concerning legal fees was submitted in support of the plaintiff’s claim for the allowance of legal fees in the amount of $2,500. A judgment was entered on March 18, 1976, in which the judge determined that legal fees in the amount of $2,500 were reasonable and proper and allowed the recovery of that amount along with the principal sum owed ($7,374.69), plus interest and deposition costs. The defendants then moved to stay entry of judgment and to vacate the judgment; they also moved for a rehearing of the plaintiff’s motion for judgment; and they sought discovery concerning the reasonableness of the fees. The *666judge entered an order denying each of these motions. He stated that “[t]he sole question argued on the plaintiff’s motion for judgment was the constitutionality of the statute (c. 149 s. 29) as it provided for reasonable attorney’s fees. The Court was led to believe that the reasonableness of the fee was not disputed. Plaintiff had submitted sufficient substantiating material by way of affidavit and records for the Court to conclude that the fee requested was reasonable” (emphasis in original).
Nowhere in their brief or their reply brief do the defendants explicitly state that they pressed the question of the reasonableness of the legal fees sought by the plaintiff at the time of the hearing before the judge on the plaintiff’s motions to confirm the master’s report and to enter judgment for the plaintiff. They were entitled to an eviden-tiary hearing if they requested one. See Boynton v. Tarbell, 272 Mass. 142, 146 (1930); Abdallah v. Boumil, 4 Mass. App. Ct. 499, 500-501 (1976). See also First Nat’l Bank v. Brink, ante, 257, 264 (1977). However, the judge did not believe that the defendants had sought to challenge the reasonableness of the legal fees before him. Although, by attempts at discovery, the defendants had once undertaken to investigate the reasonableness of the legal fees, they make no claim that they offered evidence on the reasonableness of the fees, that they requested a continuance so that their earlier attempts at discovery concerning the reasonableness of the legal fees could be carried to completion, or that they raised the question of the reasonableness of the fees in any other way.5 The record *667shows clearly that the plaintiff was pressing for the allowance of legal fees and that, at the appropriate time, the defendants did not challenge the reasonableness of the amount claimed.* **6 See Meeker v. Lehigh Valley R.R., 236 U.S. 412, 431-432 (1914).
4. The plaintiff is entitled to the costs of this appeal, and the judgment shall be modified to allow the plaintiff reasonable legal fees in connection with this appeal in accordance with G. L. c. 149, § 29. The judgment is otherwise affirmed.
So ordered.
The relevant paragraph of G. L. c. 149, § 29, was inserted by St. 1972, c. 774, § 5, and reads as follows: “A decree in favor of any claimant under this section shall include reasonable legal fees based upon the time spent and the results accomplished as approved by the court and such legal fees shall not in any event be less than published rate of any recommended fee schedule of a state-wide bar association or of a bar association in which the office of counsel for claimant is located, whichever is higher.”
In Goldfarb v. Virginia State Bar, 421 U.S. 773 (1975), the Supreme Court ruled that a minimum fee schedule which was mandatory in effect violated § 1 of the Sherman Act and noted that a purely advisory fee schedule would present a different question. Id. at 781. We note also that the Goldfarb case did not deal with a statute which referred to bar association fee schedules.
In their reply brief, the defendants assert that there are no applicable minimum fee schedules in the Commonwealth and erroneously conclude that § 29 is inoperable in the absence of such schedules. The defendants have persisted in failing to note that § 29 calls for the use of bar association recommended fee schedules only if an applicable fee schedule exists.
The defendants had attempted to take the deposition of plaintiff’s counsel. However, they had not sought leave of court to do so as Mass. R. Civ. P. 30 (a), 365 Mass. 780 (1974), requires if, as here, “there has been a hearing before a master.” They also had requested that plaintiff’s counsel produce documents under Mass. R. Civ. P. 34, 365 Mass. 792 (1974). That rule runs only against parties and not their counsel. See 8 C.A. Wright & A.R. Miller, Federal Practice and Procedure § 2208, at 615 (1970); 4A Moore’s Federal Practice pars. 34.02 [1], 34.05 [1], 34.17 n.8 (2d ed. 1975). See also Hickman v. Taylor, 329 U.S. 495, 504 (1947). The information sought was not material furnished to counsel by the plaintiff. The defendants requested that plaintiff’s coun*667sel produce records concerning fees in other G. L. c. 149, § 29, proceedings and time sheets, billing records, and memoranda concerning legal fees in this case.
There is no question here concerning the extent to which disbursements and costs of a successful claimant’s counsel may be recoverable as “legal fees” under § 29. The only such item which was allowed was the cost of depositions, which are taxable under Mass. R. Civ. P. 54 (e), 365 Mass. 820 (1974), in the judge’s discretion.