This is an action for declaratory relief under -G. L. c. 231A and for relief in the nature of mandamus under G. L. c. 249, § 5, brought against the deputy commissioner of the Division of Capital Planning and Operations *663(DCPO), a State agency, and against the DCPO itself. The action was filéd in the county court. The plaintiffs, James J. Welch & Co., Inc. (Welch), and a joint venture organization composed of The Volpe Construction Co., Inc.; Dimeo Construction Company; Daniel O’Connell’s Sons, Inc.; and Gutierrez Construction Co., Inc. (VDOG), were successful general bidders on contracts awarded by the Bureau of Building Construction (BBC), a State agency.3 Welch’s contract, awarded in 1979, was for work on the Walter E. Fernald State School; VDOG was awarded a contract in 1980 for work on the State Transportation Building. At issue is whether former G. L. c. 149, § 441 (l),4 required the DCPO to allow the plaintiffs additional “expenses and profits” based on adjustments to the general contract prices caused by the BBC’s substitution of filed subbidders for *664allowances which it had required the plaintiffs to carry in their general bids.5 We hold that it did not.
The statutorily prescribed general bid form in use at the relevant times was divided into two parts to distinguish the amount allocated to the general bidder and that allocated to the subbidders it would use.6 The general bidder was required to list in Item 2 the details of all the subbids it intended to use, as well as any allowances in lieu of subbids which the awarding agency had required. The general bidder was required to include in Item 1 the total cost of the “work of the general contractor, being all work other than that covered by Item 2.” G. L. c. 149, § 44F, as amended through St. 1961, c. 604, § 5. In addition to the actual cost of labor and materials for such work, the general bidder would include in Item 1 his bond costs and his markup for expenses and profit. The “contract price” would be the sum of the Item 1 price and the Item 2 price.
Former G. L. c. 149, § 441 (1), provided that, in the event the awarding agency caused a subbidder to be substituted for an allowance which it had previously required the general bidder to carry in Item 2 of its general bid, “the contract price shall be adjusted by the difference between the subcontract sum and the amount stated in the addendum. The general bidder shall include under Item 1 of the general bid form all expenses and profits on account of such adjustments.”7
*665At the time the plaintiffs’ bids were to be submitted, the BBC had not established a list of qualified subbidders for some of the subtrades. Accordingly, the BBC sent out addenda specifying the allowances to be made in Item 2 of the general bids for these categories. The plaintiffs incorporated these allowances in their successful bids. In each instance, the final subbid price which was substituted for these allowances was a figure in excess of the allowance. The BBC subsequently adjusted the plaintiffs’ contract prices to reflect the differences. It also adjusted the Item 1 prices to account for increases in the bond premiums the plaintiffs were obligated to pay. When the BBC refused to allow increases in the Item 1 prices for “expenses and profits”8 resulting from the adjustments,9 the plaintiffs brought this action before a single justice of this court who reserved and reported the case to the full bench.10
There is no disagreement about the purposes of the competitive bidding statute, former G. L. c. 149, §§ 44A-44L. *666As we have noted before: “We discern two fundamental, complementary legislative objectives underlying the competitive bidding statute. First, the statute enables the public contracting authority to obtain the lowest price for its work that competition among responsible contractors can secure. . . . Second, the statute establishes an honest and open procedure for competition for public contracts and, in so doing, places all general contractors and subbid-ders on an equal footing in the competition to gain the contract.” Interstate Eng’g Corp. v. Fitchburg, 367 Mass. 751, 757-758 (1975). We must, of course, construe the statute to effectuate the objectives of its framers. Id. at 757. We are not free, however, simply to excise disputed language from its statutory context and interpret it according to those perceived objectives. “It is elementary that the meaning of a statute must, in the first instance, be sought in the language in which the act is framed, and if that is plain, . . . the sole function of the courts is to enforce it according to its terms.” Caminetti v. United States, 242 U.S. 470, 485 (1917). While we think that the last sentence of § 441 (1), standing alone, is less than plain as to when expenses and profits are to be included in Item 1, any indefiniteness is clarified by reference to the statutory context.
General Laws c. 149, § 441 (1), mandated that the “general bidder shall include under Item 1 of the general bid form all expenses and profits on account of . . . adjustments.” In the preceding sentence of the statute, the term “general contractor” was used to describe the person who either was to contract with the “lowest responsible and eligible subbidder” whom he found unobjectionable or was to negotiate with the awarding agency concerning the sum to be paid to a replacement subcontractor. Though the terms were not defined in the statute, the term “general contractor” was consistently used to describe only that “general bidder” whose general bid was selected. G. L. c. 149, § 44A, as amended through St. 1977, c. 968 (“If the general bidder selected as the general contractor . . .”); G. L. c. 149, § 44B (3), as amended through St. 1961, c. 604, § 2 *667(same); G. L. c. 149, § 44F (“[T]he general contractor shall be selected on the basis of . . . general bids”). Obviously, a general bidder could not be selected as the general contractor before he submitted his general bid.11 Thus, by requiring the “general bidder” to include expenses and profits in his general bid, the Legislature indicated that this inclusion was to take place when the general bid was submitted. Otherwise, it would have used the term “general contractor” as it did in the preceding sentence.12
When we look to other specific provisions for adjustments to either the contract or item prices, a pattern emerges which we think further indicates that adjustments to Item 1 for “expenses and profits” based on subsequent adjustments to the contract price were not intended. Section 441 (2) and (3) provided that, in the event it became necessary to substitute a new subbidder for one listed in the general bid,13 the *668contract price would be adjusted by the difference between the new subbid price and the price of the one previously listed. There were no provisions for including in Item 1 the expenses and profits based on these adjustments. However, § 441 (5) provided that any new bond premiums resulting from the substitution of a subbidder would be added to the Item 1 price unless the general contractor had indicated in his general bid that the original subbidder would furnish the bond. In addition, G. L. c. 149, § 441 (6), inserted by St. 1967, c. 884, stated that, in any of the instances enumerated in paragraphs (1), (2) and (3) of that section, “the Item 1 price shall also be adjusted by the amount of the change in the premium for the general contractor’s performance bond and his labor and materials or payment bond caused by the substitution.”
The pattern we perceive is that, where an Item 2 adjustment was anticipated before the general bids were to be submitted, the Legislature provided the general bidder a mechanism to include expenses and profits based on that adjustment as part of his general bid. But where the necessity of the Item 2 adjustment was not perceived until after the lowest responsible and eligible general bidder was selected, the Legislature did not provide for an adjustment to the contract based on expenses and profits. In either case, the Legislature did allow the successful general bidder to recoup any sum which represented his increased costs because of the substitution. Also, in either case, a general bidder did not lose all opportunity to build a reasonable profit into his Item 1 costs. Since a general bidder knew the extent of the work to be performed in the various subtrades for which allowances had been made before he submitted his general bid, even though he may not have known its final cost, he was free to include in his Item 1 costs a margin for expenses and profits based on the extent of that work. Of course, he bore the risk, as he would have in any event, that his over-all contract price would be higher than the next bidder’s. Thus, all general bidders were on equal footing and the Commonwealth’s objective of obtaining the lowest possible bid was still met.
*669It may be that this system did not produce the lowest possible contract price in every instance. But it cannot be said that it was inequitable to the successful general bidder, for even if there were a substitution, the scope of his obligation to the awarding agency did not increase. He was still responsible only for that work which he had contracted to complete. It is not for us to decide whether this system best achieved the over-all objectives of the bidding laws. The Legislature may have contemplated a balance between the general bidder’s expectation of profit based on total contract price and the public’s interest in obtaining the lowest bid. Compare Simon v. Solomon, 385 Mass. 91, 101 (1982) (possible legislative balance between tenant protection and legitimate interests of landlord). Such an objective was within the Legislature’s power, and the system it devised did no violence to the public good. Even if we were to decide that a better system could have been devised, we would not substitute our judgment for that of the Legislature. See Klein v. Catalano, 386 Mass. 701, 706-707 (1982); Commonwealth v. Lammi, 386 Mass. 299, 300 (1982). Accordingly, we remand the case to the county court where a judgment is to enter declaring that G. L. c. 149, § 441 (1), did not require the Division of Capital Planning and Operations to allow the plaintiffs’ requests for expenses and profits. Relief in the nature of mandamus is to be denied.
So ordered.
Statute 1980, c. 579, shifted to the DCPO responsibility for contracts previously awarded by the BBC.
General Laws c. 149, § 441 (1), inserted by St. 1956, c. 679, § 1, provided in full: “If no sub-bid is filed for a sub-trade designated in Item 2 of the general bid form or if a rejection of all sub-bids for such a sub-trade occurs pursuant to section forty-four D or section forty-four H, the awarding authority shall state, in an addendum issued with the list of sub-bidders required by section forty-four H, the amount to be included by a general bidder under Item 2 of the general bid form for such sub-trade; and without in any way affecting other sub-bidders who have conformed to the prescribed bidding procedure, new sub-bids for such sub-trade shall be requested forthwith by written invitation to three or more qualified sub-bidders and shall be publicly opened and read by the awarding authority at a time and place to be specified in such invitation. The general contractor shall cause the work covered by such sub-trade to be done by the lowest responsible and eligible sub-bidder against whose standing and ability the general contractor makes no objection or, if there is no such sub-bidder, by such sub-contractor against whose standing and ability the general contractor makes no objection and for such sum as the general contractor and the awarding authority may agree upon; and the contract price shall be adjusted by the difference between the subcontract sum and the amount stated in the addendum. The general bidder shall include under Item 1 of the general bid form all expenses and profits and on account of such adjustments.”
The provisions of former G. L. c. 149, §§ 44A-44L, were recodified as G. L. c. 149, §§ 44A-44I, without substantial change, by St. 1980, c. 579, which made sweeping changes in other aspects of public construction contracting. Since the events giving rise to this suit occurred prior to July 1, 1981, the effective date of that act, this case will be decided under the provisions of former G. L. c. 149, §§ 44A-44L, and all references will be to c. 149 as it existed prior to the 1980 amendment, unless otherwise noted.
The bid form was set out in G. L. c. 149, § 44F. This form has been supplanted by forms issued by the awarding agency, but the essential elements of the bids are still statutorily prescribed. G. L. c. 149, § 44E, as amended through St. 1980, c. 579, § 55.
The “addendum” referred to above specified the amount of any allowances to be carried in Item 2. See note 4, supra.
The plaintiffs used the term “overhead and profit” in their brief. We take this to mean “expenses and profits,” the statutory term.
The contracts between the plaintiffs and the BBC provided in Article IV for adjustments to the contract price in the event of a “change in plans, specifications or contract. . . (except for changes pursuant to Mass. G. L. Chapter 149, Section 441).” The adjustments were to be calculated according to three specified methods. However, the contracts entered as exhibits here provide four such methods, the last of which would allow the general contractor a seven percent markup on work performed by sub-bidders pursuant to an agreed change in the contract. The plaintiffs apparently draw their figures as to how much they should be allowed for expenses and profits from these provisions. The plaintiffs are not entitled to expenses and profits based on the contract because it excludes changes pursuant to § 441. Since we have determined that there is no statutory obligation in this case for the defendants to include expenses and profits, we need not reach the plaintiffs’ argument that the defendants cannot raise the contract as a defense to the statutory obligation to pay expenses and profits.
Prior to bringing suit, Welch requested the Commissioner of Labor and Industries, who was authorized by § 44K to enforce the bidding statute, to hold an informal hearing concerning this refusal. The hearing was held and a written decision directing the BBC to allow Welch’s request was issued. The BBC did not comply with this decision.
We note also that the definition of the “lowest responsible and eligible bidder” in § 44A did not equate that bidder with the general contractor. Even if a bidder was selected as the “lowest responsible and eligible bidder,” he was not necessarily awarded the contract. If an adjustment to the contract price because of the agreed substitution of a subcontractor caused the general bid of the “lowest responsible and eligible bidder” first selected to exceed the general bid price of the second lowest responsible and eligible bidder, the latter became the general contractor unless, by the same process, adjustments forced him to yield to the third lowest responsible and eligible bidder or to the first selected bidder. G. L. c. 149, § 441 (2).
The provisions of former § 441 (1) are now contained, with slight changes, in G. L. c. 149, § 44F (4) (a), which states that “the contract price shall be adjusted by the difference between the sub-contract sum and the amount stated in the addendum. The general bidder shall include in the cost of his own work on the general bid form all expenses and profits on account of such adjustments.” While we realize that most of the change in language can be accounted for by the fact that a standard general bid form is no longer used, we think that the Legislature’s continued use of the term “general bidder,” despite other language changes, demonstrates that it meant to keep the distinction as to general bidder and general contractor clear. “Subsequent legislation may be considered in the interpretation of prior legislation on the same subject.” Boston v. Commonwealth, 322 Mass. 177, 180 (1947).
Substitution may occur when a subbidder defaults or when the selected general bidder and the awarding agency agree to substitute.