EXHIBIT 10.40 SECOND AMENDMENT TO MANAGEMENT SERVICES AGREEMENT This SECOND AMENDMENT TO MANAGEMENT SERVICES AGREEMENT (this "Amendment"), dated December 31, 1997, but effective as of January 1, 1998 (the "Effective Date"), is by and between Cambridge Industries, Inc. (the "Company") and Bain Capital, Inc. ("Bain"). WHEREAS, Bain is acting as an advisor to the Company pursuant to the terms of that certain Management Services Agreement dated as of November 17, 1995 between the Company and Bain, as amended by that certain Amendment to Management Services Agreement dated March 1, 1996 (collectively, the "Agreement"). WHEREAS, the Company and Bain wish to amend the Agreement. NOW THEREFORE, in consideration of the agreements herein contained, the parties hereto agree as follows: 1. Paragraph 3 of the Agreement is hereby amended to read in its entirety as follows, effective as of the Effective Date: 3. Advisory Fees and Transaction Fees. (a) Payment to Bain for services rendered in connection with the performance of services pursuant to this Agreement shall be $950,000 per year ("Advisory Fees") plus reasonable out-of-pocket expenses of Bain, payable by the Company on a quarterly basis in arrears. (b) During the term of this Agreement, Bain shall be entitled to receive from the Company a transaction fee in connection with (i) the consummation of each acquisition by the Company of an additional business, and (ii) the completion of a recapitalization of the Company, in either case in an amount equal to three quarters of one percent ( 3/4%) of the aggregate transaction value (each such payment, a "Transaction Fee"); provided that, Bain may waive the payment of a Transaction Fee in connection with any acquisition as to which Bain and the Board mutually agree that a Transaction Fee is not appropriate. For purposes of this Agreement, in the event of a recapitalization completed in connection with the acquisition of an additional business, the transaction value shall be the greater of the value of the acquisition or the amount of the recapitalization. 2. Applicable Law. All issues and questions concerning the construction, validity, interpretation and enforceability of this Amendment shall be governed by, and construed in accordance with, the law provisions (whether of the State of Michigan or any other jurisdiction) that would cause the application of the laws of any jurisdiction other than the State of Michigan. 3. Counterparts; Effectiveness. This Amendment may be executed in any number of counterparts and by different parties hereto in separate counterparts, each of which when so executed and delivered shall be deemed an original, but all such counterparts together shall constitute but one and the same instrument. This Amendment shall become effective upon the execution of a counterpart hereof by each of the parties hereto, and written or telephonic notification of such execution and authorization of delivery thereof has been received by each party hereto. IN WITNESS WHEREOF, the parties hereto have caused this Second Amendment to Management Services Agreement to be executed by their respective officers hereunto duly authorized on December ___, 1997, but effective as of January 1, 1998. CAMBRIDGE INDUSTRIES, INC. By: _________________________ Name: Title: BAIN CAPITAL, INC. By: __________________________ Its: _________________________ 2