SECOND AMENDMENT THIS SECOND AMENDMENT (this "Second Amendment") dated as of June 20, 1997 is to the Credit Agreement (the "Credit Agreement") dated as of September 15, 1995 between TETRA TECH, INC. (the "Company") and BANK OF AMERICA ILLINOIS (the "Bank"). Unless otherwise defined herein, terms defined in the Credit Agreement are used herein as defined therein. WHEREAS, the parties hereto have entered into the Credit Agreement which provides for the Bank to make Loans to, and to issue Letters of Credit for the account of, the Company from time to time; and WHEREAS, the parties hereto desire to amend the Credit Agreement as set forth below; NOW, THEREFORE, in consideration of the premises and for other good and valuable consideration (the receipt and sufficiency of which are hereby acknowledged), the parties hereto agree as follows: SECTION 1 AMENDMENTS. Effective on (and subject to the occurrence of) the Second Amendment Effective Date (as defined below), the Credit Agreement shall be amended as follows: SECTION 1.1 MARGIN. The definition of "Margin" in Section 1 of the Credit Agreement is amended in its entirety to read as follows: MARGIN means (i) if the Total Debt to EBITDA Ratio is greater than 2.00 to 1, 1.25% per annum in the case of Eurodollar Loans and Financial Standby Letters of Credit and 0.625% per annum in the case of Non-Financial Standby Letters of Credit, (ii) if the Total Debt to EBITDA Ratio is equal to or less than 2.00 to 1 but greater than or equal to 1.00 to 1, 1.00% per annum in the case of Eurodollar Loans and Financial Standby Letters of Credit and 0.50% per annum in the case of Non-Financial Standby Letters of Credit, and (iii) if the Total Debt to EBITDA Ratio is less than 1.00 to 1, 0.75% per annum in the case of Eurodollar Loans and Financial Standby Letters of Credit and 0.375% per annum in the case of Non-Financial Standby Letters of Credit. The Margin shall be deemed to be determined pursuant to CLAUSE (III) above until the first date following the effective date of the Second Amendment dated as of June 20, 1997 to this Agreement by which a compliance certificate is required to be delivered by the Company pursuant to SECTION 10.1.4. If any compliance certificate required to be delivered by the Company pursuant to SECTION 10.1.4 shall give rise to any adjustment in the Margin pursuant to the foregoing sentence, such adjustment shall be effective for all Loans (including any then-outstanding Loans) on the date which is 45 days (90 days in the case of any certificate delivered in connection with the annual audit report of the Company) after the date as of which such certificate is prepared; PROVIDED that if any such certificate (together with the related financial statements) is not delivered on or before the date due pursuant to SECTION 10.1.4, then the Margin shall be 1.25% per annum in the case of Eurodollar Loans and Financial Standby Letters of Credit and 0.625% per annum in the case of Non-Financial Standby Letters of Credit from such due date until such certificate is delivered. SECTION 1.2 REVOLVING TERMINATION DATE. The definition of "Revolving Termination Date" in Section 1 of the Credit Agreement is amended by deleting the date "September 15, 1998" therein and substituting therefor the date "May 30, 2000". SECTION 1.3 SECTION 2.1. Section 2.1 of the Credit Agreement is amended in its entirety to read as follows: 2.1 COMMITMENT OF THE BANK. On and subject to the terms and conditions of this Agreement, the Bank agrees (a) to make loans to the Company on a revolving basis ("LOANS") from time to time before the Revolving Termination Date in such amounts as the Company may from time to time request and (b) to issue standby letters of credit containing such terms and conditions as shall be permitted pursuant to this Agreement and satisfactory to the Bank (collectively the "LETTERS OF CREDIT" and each individually a "LETTER OF CREDIT") for the account of the Company from time to time before the Revolving Termination Date in such amounts as the Company may from time to time request; PROVIDED, that (x) the sum of (i) the aggregate outstanding principal amount of all Loans PLUS (ii) the aggregate Stated Amount of all Letters of Credit shall not at any time exceed $25,000,000 (less any reductions to the Commitment made pursuant to SECTION 6.1) and (y) the aggregate Stated Amount of all Letters of Credit shall not at any one time exceed $10,000,000. SECTION 1.4 SECTION 2.5. Section 2.5 of the Credit Agreement is amended by deleting the language "shall not be greater than one year and" in line 8 thereof. SECTION 1.5 SECTION 5.1. Section 5.1 of the Credit Agreement is amended by deleting the percentage "0.375%" therein and substituting therefor the percentage "0.25%". -2- SECTION 1.6 SECTION 5.2. Section 5.2 of the Credit Agreement is amended in its entirety to read as follows: 5.2 LETTER OF CREDIT FEES. The Company agrees to pay the Bank a letter of credit fee for each Letter of Credit in an amount equal to (x) the Margin multiplied by (y) the Stated Amount of such Letter of Credit, payable in arrears on the last day of each calendar quarter and on the Revolving Termination Date for the period from and including the date of the issuance of such Letter of Credit to and including such date or the date upon which such Letter of Credit expired or was terminated. Such letter of credit fee shall be computed for the actual number of days elapsed on the basis of a year consisting of 365 or, if applicable, 366 days. In addition, the Company agrees to pay all other fees of the Bank (at the standard rates of the Bank in effect from time to time) with respect to each Letter of Credit (including, without limitation, all fees associated with any transfer of a Letter of Credit), such fees to be payable on demand upon invoice by the Bank therefor. SECTION 1.7 SECTION 6.1.1. Section 6.1.1 of the Credit Agreement is amended in its entirety to read as follows: 6.1.1 SCHEDULED REDUCTIONS OF COMMITMENT. The amount of the Commitment shall be permanently reduced on each of the following dates to the amounts set forth opposite such dates: Commitment Maximum Reduction Date Commitment -------------- ---------- May 30, 1998 $ 20,000,000 May 30, 1999 15,000,000. SECTION 1.8 SECTION 6.1.2. Section 6.1.2 of the Credit Agreement is amended by deleting the amount "$1,000,000" therein and substituting therefor the amount "$5,000,000". SECTION 1.9 SECTION 10.1.3. Section 10.1.3 of the Credit Agreement is amended in its entirety to read as follows: 10.1.3 [INTENTIONALLY OMITTED]. SECTION 1.10 SECTION 10.6.1. Section 10.6.1 of the Credit Agreement is amended in its entirety to read as follows: 10.6.1 MINIMUM TANGIBLE NET WORTH. Not at any time permit Tangible Net Worth to be less than the sum of (i) $38,000,000 PLUS (ii) 50% of Consolidated Net Income for each Fiscal Quarter ending after June 30, 1997 PLUS (iii) -3- 100% of all proceeds (net of any underwriting discounts and brokers' commissions) of any offering or distribution of the Company's common stock or of any other equity investment in the Company. SECTION 1.11 SECTION 10.6.5. Section 10.6.5 of the Credit Agreement is amended in its entirety to read as follows: 10.6.6 FIXED CHARGE COVERAGE. Not permit the ratio, for any Computation Period, of (i) EBITDA PLUS operating lease expense (whether or not paid) of the Company and its Subsidiaries for such Computation Period to (ii) interest expense of the Company and its Subsidiaries PLUS all payments on Capital Leases and operating leases (without double-counting with interest expense) by the Company and its Subsidiaries PLUS all Restricted Payments PLUS all taxes paid by the Company and its Subsidiaries PLUS Capital Expenditures of the Company and its Subsidiaries, in each case during such Computation Period, to be less than 1.25 to 1 for any Computation Period. SECTION 1.12 SECTION 10.6.6. Section 10.6.6 of the Credit Agreement is amended in its entirety to read as follows: 10.6.6 [INTENTIONALLY OMITTED]. SECTION 1.13 SECTION 13. Section 13 of the Credit Agreement is amended by adding a new Section 13.11 following Section 13.10 of the Credit Agreement which will read as follows: SECTION 13.11 CONSENT TO JURISDICTION. THE COMPANY IRREVOCABLY AGREES THAT ALL ACTIONS OR PROCEEDINGS IN ANY WAY, MANNER OR RESPECT ARISING OUT OF OR FROM OR RELATED TO THIS AGREEMENT OR ANY LOAN DOCUMENT SHALL BE LITIGATED IN COURTS HAVING SITUS WITHIN THE CITY OF CHICAGO, STATE OF ILLINOIS. THE COMPANY HEREBY CONSENTS AND SUBMITS TO THE JURISDICTION OF ANY LOCAL, STATE OR FEDERAL COURT LOCATED WITHIN SAID CITY AND STATE AND WAIVES PERSONAL SERVICE OF ANY AND ALL PROCESS UPON THE COMPANY, AND AGREES THAT ALL SUCH SERVICE OF PROCESS MAY BE MADE BY REGISTERED MAIL DIRECTED TO THE COMPANY AT THE ADDRESS STATED ON THE SIGNATURE PAGE HEREOF AND SERVICE SO MADE SHALL BE DEEMED TO BE COMPLETED UPON ACTUAL RECEIPT THEREOF. SECTION 1.14 EXHIBIT A. Exhibit A to the Credit Agreement is hereby amended in its entirety to read in the form of EXHIBIT A hereto. SECTION 2 CONSENT. The Bank hereby consents to the acquisition by the Company of Whalen & Company, Inc. ("W&C") and -4- Whalen Service Corps., Inc. ("Whalen Service") through a merger of W&C and Whalen Service with and into the Company pursuant to the Reorganization Agreement dated as of ________, 1997 (the "Reorganization Agreement") among the Company, W&C, Whalen Service and the stockholders named in the Reorganization Agreement the "Acquisition"). SECTION 3 LETTERS OF CREDIT. Notwithstanding any provision of the Credit Agreement to the contrary, the Company and the Bank (i) agree that the Bank may issue Letters of Credit ("Non-Dollar LCs") in currencies other than Dollars, (ii) confirm that all Non-Dollar LCs previously issued under the Credit Agreement are deemed properly issued thereunder and (iii) further agree as follows with respect to such Non-Dollar LCs: 3.1 The Company agrees that its reimbursement obligation under Section 2.6 of the Credit Agreement in respect of any Non-Dollar LC (a) shall be payable in the currency in which such Non-Dollar LC was issued and (b) shall bear interest at a rate per annum equal to the sum of Overnight Rate PLUS the Margin for Eurodollar Loans PLUS 2% for each day from and including the disbursement date of such Non-Dollar LC to but excluding the date such obligation is paid in full (it being understood that any payment received after 12:00 noon, Chicago time, on any day shall be deemed received on the following Business Day). 3.2 For purposes of determining whether there is availability for the Company to request, continue or convert any Loan, or request, extend or increase the face amount of any Letter of Credit, under the Credit Agreement, the Dollar Equivalent Amount of each Non-Dollar LC shall be calculated on the date such Loan is to be made, continued or converted or such Letter of Credit is to be issued, extended or increased. 3.3 For purposes of determining the amount of the unused portion of the Commitment and letter of credit fees, the Dollar Equivalent Amount of any Non-Dollar LC shall be determined on each of (i) the date of an issuance, extension or change in the face amount of such Non-Dollar LC, (ii) the date of any payment by the Bank in respect of a drawing under such Non-Dollar LC, (iii) the last day of each calendar month and (iv) each day on which the Commitment is reduced. 3.4 If, on the last day of any calendar month or any day on which the Commitment is reduced, the sum of the principal amount of all Loans plus the Stated Amount of all Letters of Credit (valuing the Stated Amount of any -5- Non-Dollar LC at the Dollar Equivalent Amount thereof as of such day) would exceed the Commitment, then the Company will immediately eliminate such excess by prepaying Loans and/or causing one or more Letters of Credit to be reduced or terminated. 3.5 If, for the purposes of obtaining judgment in any court, it is necessary to convert a sum due in respect of any Non-Dollar LC in one currency into another currency, the rate of exchange used shall be that at which in accordance with normal banking procedures the Bank could purchase the first currency with such other currency on the Business Day preceding that on which final judgment is given. The obligation of the Company in respect of any such sum due from it to the Bank hereunder shall, notwithstanding any judgment in a currency (the "Judgment Currency") other than that in which such sum is denominated in accordance with the applicable provisions of the applicable Non-Dollar LC and this letter amendment (the "Agreement Currency"), be discharged only to the extent that on the Business Day following receipt by the Bank of any sum adjudged to be so due in the Judgment Currency, the Bank may in accordance with normal banking procedures purchase the Agreement Currency with the Judgment Currency. If the amount of the Agreement Currency so purchased is less than the sum originally due to the Bank in the Agreement Currency, the Company agrees, as a separate obligation and notwithstanding any such judgment, to indemnify the Bank against such loss. If the amount of the Agreement Currency so purchased is greater than the sum originally due to the Bank in such currency, the Bank agrees to return the amount of any excess to the Company (or to any other Person who may be entitled thereto under applicable law). 3.6 For purposes of the foregoing provisions of this SECTION 3, the following terms have the following meanings: DOLLAR EQUIVALENT AMOUNT means, at any time for any currency, the equivalent amount in Dollars as determined by the Bank at such time on the basis of the Spot Rate for the purchase of Dollars with such currency. OVERNIGHT RATE means, for any day, the rate of interest per annum at which overnight deposits in the applicable currency, in an amount approximately equal to the amount with respect to which such rate is being determined, would be offered for such day by the London -6- Branch of Bank of America National Trust and Savings Association ("BofA") to major banks in the London or other applicable offshore interbank market. The Overnight Rate for any day which is not a Business Day (or on which dealings are not carried on in the applicable offshore interbank market) shall be the Overnight Rate for the preceding Business Day. SPOT RATE means, for any currency, the rate quoted by BofA (as defined in the preceding definition) for the purchase by BofA of such currency with another currency through its FX Trading Office at approximately 8:00 a.m., San Francisco time, on the date two Business Days prior to the date as of which the applicable foreign exchange computation is to be made. SECTION 4 COLLATERAL DOCUMENTS. The Company and the Bank hereby agree that, concurrently with the transfer of any assets to the New Obligor (as defined below), the Company will deliver the following documents to the Bank (it being understood that the failure to deliver any such documents shall constitute an Event of Default under the Credit Agreement: (a) RESOLUTIONS OF NEW OBLIGOR. Certified copies of resolutions of the Board of Directors of the New Obligor authorizing the execution and delivery of the Security Agreement, the Security Agreement Amendment and the Guaranty and the performance of its obligations under each of the Amended Security Agreement and the Guaranty. (b) INCUMBENCY AND SIGNATURE CERTIFICATES OF NEW OBLIGOR. A certificate of the Secretary or the Assistant Secretary of the New Obligor certifying the names and true signatures of the officers of the New Obligor authorized to execute, deliver and perform, as applicable, the Guaranty, the Security Agreement and all other documents to be executed in connection therewith. (c) GUARANTY. A counterpart of the Guaranty duly executed by the New Obligor. (d) SECURITY AGREEMENT. A counterpart of the Security Agreement duly executed by the New Obligor, together with such UCC financing statements as the Bank may request in order to perfect the security interest of the Bank in the collateral granted under the Security Agreement. (e) SECURITY AGREEMENT AMENDMENT. A counterpart of the Security Agreement Amendment duly executed by the Company and its Subsidiaries (including the New Obligor). -7- (f) PLEDGE AGREEMENT AMENDMENT. A counterpart of the Pledge Agreement Amendment duly executed by the Company, together with the share certificates of the New Obligor and stock powers executed in blank with respect thereto. (g) OPINION. The opinion of Riordan & McKinzie, counsel to the Company and its Subsidiaries, in form and substance satisfactory to the Bank. SECTION 5 REPRESENTATIONS AND WARRANTIES. The Company represents and warrants to the Bank that each warranty set forth in Section 9 of the Credit Agreement is true and correct as if made on the date hereof, (b) the execution and delivery by the Company of this Second Amendment, the New Note (as defined below) and the letter agreement (the "Pledge Agreement Amendment") dated as of June 20, 1997 amending the Pledge Agreement, the execution and delivery by Whalen & Company, Inc. (the "New Obligor") of the Security Agreement and the Guaranty, the execution and delivery by the Company and its Subsidiaries (including the New Obligor) of the letter agreement (the "Security Agreement Amendment") dated as of June 20, 1997 amending the Security Agreement, the performance by the Company of its obligations under the Credit Agreement as amended hereby (as so amended, the "Amended Credit Agreement"), the New Note and the Pledge Agreement as amended by the Pledge Agreement Amendment (as so amended, the "Amended Pledge Agreement"), the performance by the New Obligor of its obligations under the Guaranty and the Security Agreement and the performance by the Company and its Subsidiaries (including the New Obligor) of their respective obligations under the Security Agreement as amended by the Security Agreement Amendment (as so amended, the "Amended Security Agreement") (i) are (or with respect to those documents to be executed and delivered as of June 20, 1997, upon the execution and delivery thereof will be) within the corporate powers of the Company and each Subsidiary (including the New Obligor), (ii) have been (or with respect to those documents to be executed and delivered as of June 20, 1997, upon the execution and delivery thereof will be) duly authorized by all necessary corporate action, (iii) have received (or with respect to those documents to be executed and delivered as of June 20, 1997, upon the execution and delivery will have received) all necessary governmental approval and (iv) do not and will not contravene or conflict with any provision of law or of the charter or by-laws of the Company or any Subsidiary (including the New Obligor) or of any indenture, loan agreement or other material contract, order or decree which is binding upon the Company or any Subsidiary (including the New Obligor), (c) this Second Amendment, the Amended Credit Agreement, the New Note, the Pledge Agreement Amendment, the Amended Pledge Agreement, the Security Agreement Amendment, the Amended Security Agreement and the Guaranty is (or with respect to those documents to be executed and delivered as of June 20, 1997, upon the execution and -8- delivery thereof will be) the legal, valid and binding obligation of the Company or such Subsidiary (including the New Obligor) which is party thereto, as applicable, enforceable against the Company or such Subsidiary (including the New Obligor) in accordance with its terms, except as enforceability may be limited by bankruptcy, insolvency or other similar laws of general application affecting the enforcement of creditor's rights or by general principles of equity limiting the availability of equitable remedies, (d) the Acquisition will comply in all material respects with all applicable legal requirements, and all necessary governmental, regulatory, shareholder and other consents and approvals required for the consummation of the Acquisition will be, prior to the consummation thereof, duly obtained and in full force and effect, (e) the execution and delivery of the Reorganization Agreement, and the consummation of the transactions contemplated thereby will not violate any requirement of law, and (f) all of the representations and warranties of the Company and, to the best of the Company's knowledge, W&C and Whalen Service contained in the Reorganization Agreement are true and correct in all material respects as of the date such representations and warranties were made and as of the date of the consummation of any transaction under the Reorganization Agreement. SECTION 6 EFFECTIVENESS. The amendments set forth in SECTION 1, and the consent set forth in SECTION 2, shall become effective, as of the day and year first above written, on such date (the "Second Amendment Effective Date") that the Bank shall have received (i) an amendment fee of $25,500, (ii) counterparts of this Second Amendment executed by the parties hereto and (iii) each of the following documents in form and substance satisfactory to the Bank: (a) RESOLUTIONS OF COMPANY. Certified copies of resolutions of the Board of Directors of the Company authorizing the execution and delivery of this Second Amendment, the New Note, the Pledge Agreement Amendment, and the Security Agreement Amendment and the performance of its obligations under each of the Amended Credit Agreement, the New Note, the Amended Pledge Agreement and the Amended Security Agreement. (b) INCUMBENCY AND SIGNATURE CERTIFICATE OF COMPANY. A certificate of the Secretary or the Assistant Secretary of the Company certifying the names and true signatures of the officers of the Company authorized to execute, deliver and perform, as applicable, this Second Amendment and all other documents to be executed in connection therewith. (c) NEW NOTE. The promissory note of the Company (herein called the "New Note"), substantially in the form of Exhibit A to -9- to the Credit Agreement, payable to the order of the Bank in the aggregate principal amount of $25,000,000. (d) ACQUISITION. Evidence, satisfactory to the Bank, that the Acquisition has occurred or will occur concurrently with the effectiveness of this Second Amendment. (e) OPINION. The opinion of Riordan & McKinzie, counsel to the Company and its Subsidiaries, in the form of ATTACHMENT I. SECTION 7 MISCELLANEOUS. ------------- SECTION 7.1 CONTINUING EFFECTIVENESS, ETC. As herein amended, the Credit Agreement shall remain in full force and effect and is hereby ratified and confirmed in all respects. SECTION 7.2 COUNTERPARTS. This Second Amendment may be executed in any number of counterparts and by the different parties on separate counterparts, and each such counterpart shall be deemed to be an original but all such counterparts shall together constitute one and the same Second Amendment. SECTION 7.3 GOVERNING LAW. This Second Amendment shall be a contract made under and governed by the internal laws of the State of Illinois. SECTION 7.4 SUCCESSORS AND ASSIGNS. This Second Amendment shall be binding upon the Company and the Bank and their respective successors and assigns, and shall inure to the benefit of the Company and the Bank and the successors and assigns of the Bank. -10- Delivered at Chicago, Illinois, as of the day and year first above written. TETRA TECH, INC. By_________________________________ Title____________________________ BANK OF AMERICA ILLINOIS By_________________________________ Title____________________________ Each of the undersigned hereby acknowledges and agrees to the foregoing Second Amendment and the Amended Credit Agreement and hereby confirms the continuing effectiveness of the Guaranty and the Security Agreement with respect to the Amended Credit Agreement. HSI GEOTRANS, INC. By:___________________________ Title:________________________ SIMONS, LI & ASSOCIATES, INC. By:___________________________ Title:________________________ TETRA TECH EM, INC. By:___________________________ Title:________________________ EXHIBIT A FORM OF NOTE $25,000,000 June 20, 1997 Chicago, Illinois The undersigned, for value received, promises to pay to the order of BANK OF AMERICA ILLINOIS, an Illinois banking corporation having its principal office at 231 South LaSalle Street, Chicago, Illinois (the "Bank") at the principal office of the Bank in Chicago, Illinois, TWENTY-FIVE MILLION DOLLARS or, if less, the aggregate unpaid amount of all Loans made by the undersigned pursuant to the Credit Agreement referred to below (as shown on the schedule attached hereto (and any continuation thereof) or in the records of the Bank), such principal amount to be payable in installments as set forth in the Credit Agreement. The undersigned further promises to pay interest on the unpaid principal amount of each Loan from the date of such Loan until such Loan is paid in full, payable at the rate(s) and at the time(s) set forth in the Credit Agreement. Payments of both principal and interest are to be made in lawful money of the United States of America. This Note evidences indebtedness incurred under, and is subject to the terms and provisions of, the Credit Agreement, dated as of September 15, 1995 (herein, as amended or otherwise modified from time to time, called the "Credit Agreement"; terms not otherwise defined herein are used herein as defined in the Credit Agreement), between the undersigned and the Bank, to which Credit Agreement reference is hereby made for a statement of the terms and provisions under which this Note may or must be paid prior to its due date or its due date accelerated. In addition to and not in limitation of the foregoing and the provisions of the Credit Agreement, the undersigned further agrees, subject only to any limitation imposed by applicable law, to pay all expenses, including reasonable attorneys' fees and legal expenses, incurred by the holder of this Note in endeavoring to collect any amounts payable hereunder which are not paid when due, whether by acceleration or otherwise. This Note is made under and governed by the internal laws of the State of Illinois. TETRA TECH, INC. By:__________________________ Title:____________________ -2- Schedule Attached to Note dated June 20, 1997 of TETRA TECH, INC. payable to the order of BANK OF AMERICA ILLINOIS. Date and Date and Amount of Amount of Loan or of Repayment or of Interest Conversion from Conversion into Period/ Unpaid another type of another type of Maturity Principal Notation Loan Loan Date Balance Made by 1. FLOATING RATE LOANS ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ 2. EURODOLLAR LOANS ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ ____________________________________________________________________________ -3-