Exhibit 10.1 SECOND AMENDED AND RESTATED CREDIT AGREEMENT THIS SECOND AMENDED AND RESTATED CREDIT AGREEMENT dated as of September 30, 2001 among TREX COMPANY, LLC, a Delaware limited liability company, TREX COMPANY, INC., a Delaware corporation, (collectively the "Borrower") and FIRST UNION NATIONAL BANK (the "Bank"), a national banking association. RECITALS: WHEREAS, TREX Company, LLC, Trex Company, Inc. and the Bank entered into an Amended and Restated Credit Agreement dated as of August 3, 1999 as amended from time to time (the "Original Credit Agreement") pursuant to which the Bank made available to TREX Company, LLC a revolving line of credit and a term loan facility which revolving line of credit and term loan facility were guaranteed by Trex Company, Inc.; WHEREAS, this Agreement amends and restates in its entirety the Original Credit Agreement and applies to all loan or loans (individually and collectively the "Obligations") between Bank and Borrower as evidenced by one or more promissory notes and other documents, as modified from time to time (the Loan Documents as defined in the Appendix); WHEREAS, Trex Company, Inc. has agreed to be added to the Loan Documents as a Borrower; WHEREAS, Borrower and Bank have agreed to restructure the Obligations; WHEREAS, in furtherance of the foregoing the Borrower and the Bank have agreed to amend and restate the Original Credit Agreement; NOW, THEREFORE, in consideration of the foregoing recitals and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Borrower and the Bank agree to amend, restate and replace the Original Credit Agreement as follows: ARTICLE I DEFINITIONS Section 1.01. Definitions. All capitalized terms used in this Agreement or in any Appendix, Schedule or Exhibit hereto which are not otherwise defined herein or therein shall have the respective meanings set forth in the Appendix attached hereto identified as the Definitions Appendix. The Definitions Appendix is incorporated herein by reference in its entirety and is a part of this Agreement to the same extent as if it had been set forth in this Section 1.01 in full. Section 1.02. Accounting Terms and Determinations. Unless otherwise specified herein, all accounting terms used herein shall be interpreted, all accounting determinations hereunder shall be made, and all financial statements required to be delivered hereunder shall be prepared, in accordance with generally accepted accounting principles in the United States of America as in effect from time to time, applied on a basis consistent (except for changes concurred in by the Borrower's independent public accountants) with the most recent audited consolidated financial statements of the Borrower and its Consolidated Subsidiaries delivered to the Bank. ARTICLE II THE CREDIT Section 2.01. Commitment To Lend. (a) Term Loan. The Bank agrees, on the terms and conditions set forth in this Agreement, to convert $58,000,000 of the Revolving Loans of TREX Company, LLC made pursuant to the Original Credit Agreement to a term loan to the Borrower ("Term Loan A"). (b) Revolving Commitment. The Bank agrees, on the terms and conditions set forth in this Agreement, to make Revolving Loans to the Borrower from time to time during the Revolving Credit Period in amounts such that the aggregate principal amount of Revolving Loans at any one time outstanding will not exceed the lesser of (i) the available Borrowing Base or (ii) the Revolving Commitment. Within the foregoing limit, the Borrower may borrow, prepay and reborrow Revolving Loans at any time during the Revolving Credit Period. (c) Borrowing Base. Revolving loans will be subject to monthly borrowing base reporting. i. "Borrowing Base" means 85.00% of the net amount of Eligible Accounts, plus 60.00% of the value of Eligible Inventory, less the amount of any Reserves required by Bank. ii. "Eligible Account" means an account receivable which is (a) not more than 90 days from the date of the original invoice and (b) not more than 60 days from the due date of the original invoice that arises in the ordinary course of Borrower's business and meets the following eligibility requirements: 1. the sale of goods or service reflected in such account is final and such goods and services have been delivered or provided and accepted by the account debtor and payment for such is owing: 2. the invoices comprising an account are not subject to any claims, returns or disputes of any kind; 3. the account debtor is not insolvent; 2 4. the account debtor has its principal place of business in the United States; 5. the account debtor is not an Affiliate of Borrower and is not a supplier to Borrower and the account is not otherwise exposed to risk of set-off; and 6. the account is not subject to any lien prior to the lien of Bank iii. "Eligible Inventory" means inventory of finished goods in Borrower's possession that is held for use or sale in the ordinary course of Borrower's business and is not unmerchantable or obsolete and is subject to a first priority perfected security interest in favor of Bank. The value of the inventory will be valued at the lower of cost or market on a first-in, first-out basis as determined in accordance with generally accepted accounting principles applied on a consistent basis. iv. "Reserves" means such amounts as may be required by Bank, at any time and from time to time without prior notice to Borrower, which Bank deems, in its sole but reasonable discretion, to be adequate to reserve against outstanding letters of credit, outstanding banker's acceptances, Borrower's obligations to Bank or its affiliates or any guaranties or other contingent debts of Borrower. Section 2.02. Existing Loans (a) Term Real Estate Term Loan 1. (b) Real Estate Term Loan 2. (c) Real Estate Term Loan 3. (d) ISDA Master Agreement. (e) Letter of Credit SM413821. Section 2.03. Methods of Borrowing. (a) Notice of Borrowing. Except as otherwise provided in this Section and/or the Services Agreement, the Borrower may, with the approval of the Bank, give the Bank notice substantially in the form of Exhibit A hereto (a "Notice of Borrowing") not later than 12:00 p.m. (local time in Winchester, Virginia) on the date of each requested Loan, specifying the date of such Loan and the amount of such Loan. (b) Cash Management Services. The Borrower subscribes to the Bank's cash management services and such services are applicable to the Revolving Loans. The terms of such services, as set forth in the Services Agreement, shall control the manner in which funds are transferred between the Operating Account and the Revolving Loans for credit or debit to the Revolving Loans. 3 (c) Overdrafts in Other Accounts. The Bank may, at its option, pay any Item which will cause any deposit account maintained by the Borrower with the Bank to become overdrawn; and such payment shall be deemed a Revolving Loan hereunder. Section 2.04. Funding of Revolving Loans. The Bank shall disburse the proceeds of each Loan made pursuant to Section 2.01 as follows: the proceeds of each Loan under Section 2.01 shall be made available by the Bank to the Borrower in federal or other funds immediately available at the Bank's address referred to in Section 9.01. Section 2.05. Revolving Loans Note. (a) Evidence of Loans. The Revolving Loans shall be evidenced by a single Note payable to the order of the Bank in an amount equal to the Revolving Commitment. (b) Records of Amounts Due. The Bank shall record the date and amount of each Loan made by it and the date and amount of each payment of principal made by the Borrower with respect thereto, and may, if the Bank so elects in connection with any transfer or enforcement of each Note, endorse on the schedule forming a part thereof appropriate notations to evidence the foregoing information with respect to each such Loan then outstanding, provided that the failure of the Bank to make any such recordation or endorsement shall not affect the obligations of the Borrower hereunder or under such Note. The Bank is hereby irrevocably authorized by the Borrower so to endorse each Note and to attach to and make a part of such Note a continuation of any such schedule as and when required. The Bank shall send the Borrower a copy of any endorsements and continuations so made. Section 2.06. Interest Rate. (a) Revolving Loans. From the date hereof until and including June 30, 2002, each Revolving Loan shall bear interest on the outstanding principal amount thereof, for each day from the date such Loan is made until it becomes due, at a rate per annum equal to the applicable LIBOR Market Index-Based Rate for such day plus 300 basis points. From July 1, 2002 and continuing while the Revolving Loans remain outstanding, each Revolving Loan shall bear interest on the outstanding principal amount thereof, for each day from the date such Loan is made until it becomes due, at a rate per annum equal to the applicable LIBOR Market Index-Based Rate for such day plus 400 basis points. Such interest shall be payable for each month in arrears on the first day of the immediately succeeding calendar month. (b) Term Loan A. From the date hereof until and including June 30, 2002, the first $33,000,000 of unpaid principal balance on Term Loan A shall bear interest, payable monthly in arrears, at a rate per annum equal to the applicable LIBOR Market Index-Based Rate for such day plus 300 basis points and any unpaid principal balance in excess of $33,000,000 shall bear interest, at a rate per annum equal to the applicable LIBOR Market Index-Based Rate for such day plus 500 basis points. From July 1, 2002, the first $33,000,000 of unpaid principal balance on Term Loan A shall bear interest, at a rate per annum equal to the applicable LIBOR Market Index-Based Rate for such day 4 plus 400 basis points and any unpaid principal balance in excess of $33,000,000 shall bear interest, at a rate per annum equal to the applicable LIBOR Market Index-Based Rate for such day plus 500 basis points. "LIBOR Market Index-Based Rate" shall be the rate per annum equal to the LIBOR Market Index Rate as that rate may change from day to day. "LIBOR Market Index Rate," for any day, is the rate for one-month U.S. Dollar deposits as reported on Telerate page 3750 as of 11:00 a.m., London time, on such day, or if such day is not a London business day, then the immediately preceding London business day (or, if not so reported, then as determined by the Bank from another recognized source or interbank quotation). (c) Real Estate Term Loans 1, 2 & 3. From the date hereof until and including June 30, 2002, each of Real Estate Term Loans 1, 2 & 3 shall bear interest on the unpaid principal balance thereof, payable monthly in arrears at a rate per annum equal to LIBOR + 300 basis points. From July 1, 2002, each of Real Estate Term Loans 1, 2 & 3 shall bear interest on the unpaid principal balance thereof, payable monthly in arrears at a rate per annum equal to LIBOR + 400 basis points. As further provided in the Real Estate Term Loan Notes, "LIBOR" is the rate for U.S. dollar deposits with a one-month maturity, as reported on Telerate page 3750 as of 11:00 a.m., London time, on the second London business day before the relevant one-month interest period begins (or if not so reported, then as determined by the Bank from another recognized source or interbank quotation). (d) Overdue Amounts. Any overdue principal of or interest on any Loan shall bear interest, payable on demand, for each day from and including the date payment thereof was due to but excluding the date of actual payment, at a rate per annum equal to the sum of 2% over the rate, as calculated above, applicable to such Loan on such day. Section 2.07. Unused Commitment Fee. The Borrower shall pay to the Bank an unused commitment fee (the "Unused Commitment Fee") for each day at a rate per annum equal to the product of (i) 15 basis points multiplied by (ii) the excess of the Revolving Commitment over the aggregate amount of the Revolving Loans on such day. Such unused commitment fee shall accrue from and including the Effective Date to but excluding the Termination Date (or earlier date of termination of the Revolving Commitment in its entirety) and shall be payable quarterly in arrears on each Quarterly Date and on the Termination Date. Section 2.08. Adjustments of Commitment. (a) Optional Termination or Reductions of Revolving Commitment. The Borrower may, upon at least three Business Days' notice to the Bank, (i) terminate the Revolving Commitment at any time, if no Revolving Loans are outstanding at such time, or (ii) reduce from time to time the amount of the Revolving Commitment in excess of the aggregate outstanding principal amount of the Revolving Loans. If the Revolving Commitment is terminated in its entirety, all accrued fees shall be payable on the effective date of such termination. 5 Section 2.09. Maturity and Repayment of Loan. (a) Maturity of Revolver on Termination Date. Each Revolving Loan shall mature, and the principal amount thereof shall be due and payable, on the Termination Date. (b) Cash Management Services. The Revolving Loans shall be repaid as set forth in the Services Agreement, and consistent with this Agreement. (c) Term Loan A. Term Loan A shall be payable in part by five consecutive monthly payments of $5,000,000 each beginning on March 1, 2002 and continuing through July 1, 2002. The entire unpaid principal balance of Term Loan A and all accrued interest thereon shall be due and payable in full on January 31, 2003. (d) Real Estate Term Loans 1, 2 & 3. Real Estate Term Loans 1, 2 & 3 shall continue on their current amortization schedule; provided, however, that the entire unpaid principal balance of Real Estate Term Loans 1, 2 & 3, and all accrued interest thereon shall be due and payable in full on the earlier of (i) the date that Borrower repays in full all principal and interest due on Revolving Loans and Term Loan A and (ii) January 31, 2003. Provided, however, that in the event that Borrower repays in full all principal and interest outstanding Revolving Loans and Term Loan A, and Borrower desires to maintain Real Estate Term Loans 1, 2 & 3, Borrower may elect to extend the maturity date of Real Estate Term Loans 1, 2 & 3 to January 31, 2005 if it is demonstrated to the Bank's sole satisfaction, based upon MAI appraisals performed at the time that Borrower makes such election, that the loan to value of each Real Estate Term Loan to the real estate, together with all improvements thereon as of the date of the election, originally secured by such loan does not exceed 70%. (e) Optional Prepayment of Loans. Provided that with respect to Real Estate Terms Loans 1, 2 & 3, Borrower shall indemnify Bank against Bank's loss or expense in employing deposits of as a consequence of Borrower's payment, prepayment or conversion of Real Estate Term Loans 1, 2 & 3, on a date other than the last date of the one-month interest period set forth in the Real Estate Term Notes, the Borrower may upon at least one Business Day's notice to the Bank, prepay Real Estate Term Loans 1, 2 & 3 and/or Term Loan A, in whole at any time, or from time to time in part, by paying the principal amount to be prepaid together with accrued interest thereon to the date of prepayment. The notice of prepayment delivered by the Borrower to the Bank shall not be revocable by the Borrower following its receipt by the Bank. Any prepayment of Real Estate Term Loans 1, 2 & 3 shall be applied to Real Estate Term Loans 1, 2 & 3 in the inverse order of their maturities. Repayment of the Revolving Loans shall be governed by the Services Agreement. Section 2.10. General Provisions as to Payments. The Borrower shall make each payment of principal of and interest on the Loans and fees hereunder not later than 12:00 noon (local time in Winchester, Virginia) on the date when due, without setoff, counterclaim or other deduction, in federal or other funds immediately available to the Bank at its address referred to in Section 9.01 or such other location as designated by the Bank. Whenever any payment of 6 principal of, or interest on, the Loans or of fees shall be due on a day which is not a Business Day, the date for payment thereof shall be extended to the next succeeding Business Day. If the date for any payment of principal is extended by operation of law or otherwise, interest thereon shall be payable for such extended time. Section 2.11. Computation of Interest and Fees. Interest on Loans hereunder shall be computed on the basis of a year of 360 days and paid for the actual number of days elapsed (including the first day but excluding the last day). ARTICLE III COLLATERAL Section 3.01. Collateral. The Obligations shall be secured by a lien in the following assets of Borrower and its Subsidiaries. (a) First priority deed of trust on property located in the City of Winchester and Frederick County, Virginia, as more particularly described therein. (b) Second priority deed of trust on property located in Lyon County, Nevada, as more particularly described therein. (c) First priority lien on all of the business assets of any type and description of Borrower and its Subsidiaries, excluding Winchester Capital, Inc. and Trex Wood Polymer Espana, S.L. including any property or acquisitions, whether now owned of hereafter acquired and wherever located as more particularly described in the Security Agreement; and (d) First priority lien on all stock of Borrowers' in their Subsidiaries, excluding the stock of Trex Wood Polymer Espana, S.L, as more particularly described in the Security Agreement. ARTICLE IV CONDITIONS Section 4.01. Conditions to Closing. The obligation of the Bank to make the first Loan hereunder is subject to the satisfaction of the following conditions: (a) Effectiveness. This Agreement shall have become effective as of the date hereof. (b) Notes. On or prior to the Closing Date, the Bank shall have received a duly executed Revolving Note; Term Loan A Note; Real Estate Term Loan 1 Note; Real Estate Term Loan 2 Note and Real Estate Term Loan 3 Note dated on or before the Closing Date complying with the provisions of Section 2 hereof. 7 (c) Other Loan Documents. Each of the Loan Documents to be executed on or before the Closing Date shall be in form and substance reasonably satisfactory to the Bank and shall have been duly executed and delivered to the Bank by each of the parties thereto. (d) Adverse Change, Etc. On the Closing Date, nothing shall have occurred (and the Bank shall not have become aware of any facts or conditions not previously known) which has, or could reasonably be expected to have, a Material Adverse Effect. (e) Officer's Certificate. The Bank shall have received a certificate dated the Closing Date signed on behalf of the Borrower by the Chairman of the Board, the President, any Vice President or the Treasurer of the Borrower stating that (i) on the Closing Date and after giving effect to the Loan being made on the Closing Date, and to this Agreement, no Default or Event of Default shall have occurred and be continuing and (ii) to the best knowledge and belief of such officer, the representations and warranties of the Borrower contained in the Loan Documents are true and correct on and as of the Closing Date. (f) Opinion of Counsel. On the Closing Date, the Bank shall have received from counsel to the Borrower an opinion addressed to the Bank, dated the Closing Date, substantially in the form of Exhibit C hereto and covering such additional matters incident to the transactions contemplated hereby as the Bank may reasonably request. (g) Borrower's Proceedings. (i) On the Closing Date, the Bank shall have received for TREX Company, LLC: (A) a copy of the its Certificate of Formation, as amended, certified by the Secretary of State of Delaware and dated as of a recent date prior to the Closing Date; (B) a certificate of the Secretary of State of Delaware and each other state in which it is qualified as a foreign limited liability company to do business, dated as of a recent date prior to the Closing Date, as to the good standing of the Borrower; (C) a copy of the its Limited Liability Company Agreement, including all amendments thereto; and (D) a certificate of the appropriate officer or other authorized person of TREX Company, LLC dated the Closing Date and certifying (1) that the documents referred to in clause (C) above have not been amended since the date of said certificate, (2) that attached thereto is a true, correct and complete copy of resolutions and consents adopted by its sole member authorizing the execution, delivery and performance of the Credit Agreement, the Notes and the Security Agreement and each other document delivered in connection herewith or therewith and that said resolutions have not been amended and are in full force and effect on the date of such certificate, (3) as to the incumbency and specimen signatures of its officer or other authorized person executing this Agreement, the Notes and the Security Agreement or any other document delivered in connection herewith or therewith and (4) certifying as to the names and respective jurisdictions of organization of all of its Subsidiaries existing on the Closing Date. 8 All company and legal proceedings and instruments and agreements relating to the transactions contemplated by this Agreement or in any other document delivered in connection therewith shall be satisfactory in form and substance to the Bank and its counsel, and the Bank shall have received all information and copies of all documents and papers, including records of company proceedings, governmental approvals, good standing certificates and bring-down telegrams, if any, which the Bank reasonably may have requested in connection therewith, such documents and papers where appropriate to be certified by proper company or governmental authorities. (ii) On the Closing Date, the Bank shall have received for Trex Company, Inc.: (A) a copy of the its Certificate of Incorporation, as amended, certified by the Secretary of State of Delaware and dated as of a recent date prior to the Closing Date; (B) a certificate of the Secretary of State of Delaware and each other state in which it is qualified as a foreign corporation to do business, dated as of a recent date prior to the Closing Date, as to the good standing of the Borrower; (C) a copy of the its by-laws, including all amendments thereto; and (D) a certificate of the appropriate officer or other authorized person of Trex Company, Inc. dated the Closing Date and certifying (1) that the documents referred to in clause (C) above have not been amended since the date of said certificate, (2) that attached thereto is a true, correct and complete copy of resolutions adopted by its directors authorizing the execution, delivery and performance of the Credit Agreement, the Notes, the Security Agreement, the Warrant, the Registration Agreement and each other document delivered in connection herewith or therewith and that said resolutions have not been amended and are in full force and effect on the date of such certificate, (3) as to the incumbency and specimen signatures of its officer or other authorized person executing this Agreement, the Notes and the Security Agreement or any other document delivered in connection herewith or therewith and (4) certifying as to the names and respective jurisdictions of organization of all of its Subsidiaries existing on the Closing Date. All corporate and legal proceedings and instruments and agreements relating to the transactions contemplated by this Agreement or in any other document delivered in connection therewith shall be satisfactory in form and substance to the Bank and its counsel, and the Bank shall have received all information and copies of all documents and papers, including records of company proceedings, governmental approvals, good standing certificates and bring-down telegrams, if any, which the Bank reasonably may have requested in connection therewith, such documents and papers where appropriate to be certified by proper company or governmental authorities. (h) Perfection of Security Interests; Search Reports. On or prior to the Closing Date, the Bank shall have received: (i) a Perfection Certificate of the Borrower, substantially in the form of Exhibit A to the Security Agreement; 9 (ii) appropriate Financing Statements (Form UCC-l or such other financing statements or similar notices as shall be required by local law) appropriately completed for filing under the Uniform Commercial Code or other applicable local law of each jurisdiction in which the filing of a financing statement or giving of notice may be required, or reasonably requested by the Bank, to perfect the Liens purported to be created by the Loan Documents; (iii) appropriate filings for the perfection of the lien on intellectual property purported to be created by the Loan Documents; (iv) appropriate Deeds of Trust fully executed for filing under applicable local law of each jurisdiction in which the filing of a Deed of Trust is required by the Bank to perfect the liens purported to be created thereby; (v) copies of reports from Prentice-Hall Financial Services or other independent search service reasonably satisfactory to the Bank listing all effective financing statements that name the Borrower or any of its Subsidiaries (under its present name and any previous name and, if requested by the Bank, under any trade names) as debtor or seller that are filed in Delaware, Nevada and Virginia, together with copies of such other financing statements filed in Delaware, Nevada and Virginia (none of which shall cover the Collateral (as that term is defined in the Security Agreement) except to the extent evidencing Permitted Liens or for which the Bank shall have received termination statements (Form UCC-3) or such other termination statements as shall be required by local law) fully executed for filing; and (vi) evidence of the completion of all other filings and recordings of, or with respect to, the Loan Documents as may be necessary or, in the opinion of the Bank, desirable to perfect the security interests intended to be created by the Loan Documents. (After the aforementioned filings and recordings have been effected, the Bank shall execute all termination statements submitted by the Borrower effecting the termination of all filings and recordings pertaining to previous terminated or superseded agreements between the parties.) (i) Payment of Fees. All reasonable costs, fees and expenses due to the Bank on or before the Closing Date (including, without limitation, that portion of the Commitment Fee then due and owing, legal fees and expenses) shall have been paid. (j) Counsel Fees. The Bank shall have received payment from the Borrower of the reasonable fees and expenses of Kutak Rock LLP described in Section 8.03 which are billed through the Closing Date. (k) Warrants. The Bank shall have received the fully-executed Warrant and Registration Agreement. 10 The Bank shall promptly notify the Borrower of the Closing Date, and such notice shall be conclusive and binding on all parties hereto. The documents referred to in this Section shall be delivered to the Bank no later than the Closing Date. The certificates and opinion referred to in this Section shall be dated the Closing Date. Section 4.02. Conditions to All Loans. The obligation of the Bank to make each Loan is subject to the satisfaction of the following conditions: (a) the fact that the Closing Date shall have occurred; (b) with respect to each Revolving Loan, the fact that, immediately after the making of such Loan, the aggregate outstanding principal amount of all Revolving Loans will not exceed the Revolving Commitment; (c) the fact that, immediately before and after the making of such Loan, no Default shall have occurred and be continuing; (d) the fact that the representations and warranties of the Borrower contained in this Agreement shall be true on and as of the date of such Loan; and (e) (i) the Bank shall in good faith have determined that its prospect of receiving payment in full of the Obligations then outstanding or its ability to exercise its rights and remedies hereunder and under the other Loan Documents have not been impaired, (ii) no event or condition shall have occurred since the Effective Date which has or could reasonably be expected to have a Material Adverse Effect or (iii) the Bank shall not reasonably suspect that one or more Events of Default have occurred and are continuing. Each Loan hereunder shall be deemed to be a representation and warranty by the Borrower on the date of such Loan as to the facts specified in clauses (c) and (d) of this Section. ARTICLE V REPRESENTATIONS AND WARRANTIES The Borrower represents and warrants that: Section 5.01. Existence and Power. TREX Company, LLC is a limited liability company duly organized, validly existing and in good standing under the laws of the State of Delaware and has all powers and all material governmental licenses, authorizations, consents and approvals required to carry on its business as now conducted. Trex Company, Inc. is a corporation duly organized, validly existing and in good standing under the laws of the State of Delaware and has all powers and all material governmental licenses, authorizations, consents and approvals required to carry on its business as now conducted. Each of the Subsidiaries is duly organized, validly existing and in good standing under the laws of the state of its organization and has all powers and all material governmental licenses, authorizations, consents and approvals required to carry on its business as now conducted. Each Borrower and the Subsidiaries is duly qualified as a foreign entity, licensed and in good standing in each jurisdiction where 11 qualification or licensing is required by the nature of its business or the character and location of its property, business or customers and in which the failure to so qualify or be licensed, as the case may be, in the aggregate, could have a Material Adverse Effect. Section 5.02. Company and Governmental Authorization; No Contravention. (a) The execution, delivery and performance by TREX Company, LLC of the Loan Documents to which it is a party are within its limited liability company powers, have been duly authorized by all necessary company action, require no action by or in respect of, or filing with, any governmental body, agency or official (except for any such action or filing as shall have been taken or made and that is in full force and effect from and after the Closing Date) and do not contravene, or constitute (with or without the giving of notice or lapse of time or both) a default under, any provision of applicable law or of the organizational documents of TREX Company, LLC or any Subsidiary or of any agreement, judgment, injunction, order, decree or other instrument binding upon or affecting TREX Company, LLC or any Subsidiary or result in the creation or imposition of any Lien on any asset of TREX Company, LLC or any of its Subsidiaries except as stated therein. (b) The execution, delivery and performance by Trex Company, Inc. of the Loan Documents to which it is a party are within its corporate powers have been duly authorized by all necessary corporate action, require no action by or in respect of, or filing with, any governmental body, agency or official (except for any such action or filing as shall have been taken or made and that is in full force and effect from and after the Closing Date) and do not contravene, or constitute (with or without the giving of notice or lapse of time or both) a default under, any provision of applicable law or of the organizational documents of Trex Company, Inc. or any Subsidiary or of any agreement, judgment, injunction, order, decree or other instrument binding upon or affecting Trex Company, Inc. or any Subsidiary or result in the creation or imposition of any Lien on any asset of Trex Company, Inc. or any of its Subsidiaries, except as stated therein. Section 5.03. Binding Effect. Each Loan Document other than the Notes to which the Borrower is a party constitutes a valid and binding agreement of the Borrower and each Note, when executed and delivered in accordance with this Agreement, will constitute a valid and binding obligation of the Borrower, in each case enforceable against the Borrower in accordance with its terms except in each case as such enforceability may be limited by bankruptcy, insolvency or similar laws affecting creditors' rights generally and by equitable principles of general applicability (regardless of whether such enforceability is considered in a proceeding in equity or at law). Section 5.04. Financial Condition. (a) Interim Financial Statements. The unaudited consolidated balance sheet of Trex Company, Inc. and its Consolidated Subsidiaries as of September 30, 2001 and the related unaudited consolidated income statements for the fiscal quarter then ended, copies of which have been delivered to the Bank, fairly present, in conformity with generally accepted accounting principles applied on a basis consistent with the audited 12 financial statements for the fiscal year ended December 31, 2000, the consolidated financial position of Trex Company, Inc. and its Consolidated Subsidiaries as of such date and their consolidated results of operations and changes in financial position for such 12-month period (subject to normal year-end audit adjustments). (b) Material Adverse Change. Since September 30, 2001, there has been no material adverse change in condition (financial or otherwise), results of operations, properties, assets, business or prospects of Trex Company, Inc. or Trex Company, Inc. and its Consolidated Subsidiaries, considered as a whole. Section 5.05. Litigation. Except as set forth on Schedule 5.05, there is no material action, suit, proceeding or investigation pending against, or to the knowledge of the Borrower threatened against, contemplated or affecting, the Borrower or any of its Subsidiaries before any court, arbitrator or governmental body, agency or official which has, or could reasonably be expected to have, a Material Adverse Effect, or which in any manner draws into question the validity or enforceability of this Agreement or the Notes, and there is no basis known to the Borrower or any of its Subsidiaries for any such action, suit, proceeding or investigation. Section 5.06. Regulation U; Use of Proceeds. The Borrower and its Subsidiaries do not own any "margin stock" as such term is defined in Regulation U. The proceeds of the Loans will be used by the Borrower only for the purposes set forth in Section 6.15 hereof. Section 5.07. Regulatory Restrictions on Borrowing. Neither the Borrower nor any of its Subsidiaries is an "investment company" within the meaning of the Investment Company Act of 1940, as amended, a "holding company" within the meaning of the Public Utility Holding Company Act of 1935, as amended, or otherwise subject to any regulatory scheme which restricts its ability to incur debt. Section 5.08. Subsidiaries. Part I of Schedule 5.08 (as such Schedule may be supplemented by a writing delivered by the Borrower to the Bank from time to time after the Effective Date) hereto lists each Subsidiary of the Borrower (and the direct and indirect ownership interests of the Borrower therein), in each case existing on the Effective Date. Except as set forth on Part I of such Schedule 5.08, each such Subsidiary existing on the date hereof is, and in the case of any additional corporate Subsidiaries formed after the Effective Date each of such additional corporate Subsidiaries will be at each time that this representation is made or deemed to be made after the Effective Date, a wholly owned Subsidiary that is a corporation duly incorporated, validly existing and, to the extent relevant in such jurisdiction, in good standing under the laws of its jurisdiction of incorporation, and has all corporate powers and all material governmental licenses, authorizations, consents and approvals required to carry on its business as now conducted. Except as listed on Part II of Schedule 5.08 (as such Schedule may be supplemented by a writing delivered by the Borrower to the Bank from time to time after the Effective Date), neither the Borrower nor any of its Subsidiaries are engaged in any joint venture or partnership with any other Person. 13 Section 5.09. Full Disclosure. All factual information (taken as a whole) furnished by or on behalf of the Borrower or any of its Subsidiaries in writing to the Bank for purposes of or in connection with this Agreement or any transaction contemplated hereby is true and accurate in all material respects on the date as of which such information is dated or certified and is not incomplete by omitting to state any material fact necessary to make such information (taken as a whole) not misleading at such time in light of the circumstances under which such information was provided. Except for economic trends generally known to the public affecting generally the industry in which the Borrower and its Subsidiaries conduct their business, the Borrower has disclosed to the Bank in writing any and all facts which materially and adversely affect or may materially and adversely affect (to the extent the Borrower can now reasonably foresee) the business, operations or financial condition of Trex Company, Inc. and its Consolidated Subsidiaries taken as a whole or the ability of the Borrower to perform its obligations under this Agreement. Section 5.10. Tax Returns and Payments. Each of the Borrower and its Subsidiaries has filed all United States federal income tax returns and all other material tax returns, domestic and foreign, required to be filed by it and has paid all taxes and assessments payable by it which have become due pursuant to such returns or pursuant to any assessment received by the Borrower or any Subsidiary, other than those not yet delinquent and except for those contested in good faith. Each of the Borrower and its Subsidiaries has paid, or has provided adequate reserves (in good-faith judgment of the management of the Borrower) for the payment of, all federal, state and foreign income taxes applicable for all prior fiscal years and for the current fiscal year to the date hereof. Section 5.11. Compliance With ERISA. Each member of the ERISA Group has fulfilled its obligations under the minimum funding standards of ERISA and the Internal Revenue Code with respect to each Plan and is in compliance in all material respects with the presently applicable provisions of ERISA and the Internal Revenue Code with respect to each Plan. No member of the ERISA Group has (a) sought a waiver of the minimum funding standard wider Section 412 of the Internal Revenue Code in respect of any Plan, (b) failed to make any contribution or payment to any Plan or Multiemployer Plan or in respect of any Benefit Arrangement, or made any amendment to any Plan or Benefit Arrangement, which has resulted or could result in the imposition of a Lien or the posting of a bond or other security under ERISA or the Internal Revenue Code or (c) incurred any liability under Title IV of ERISA other than a liability to the PBGC for premiums under Section 4007 of ERISA. Section 5.12. Intellectual Property. Each of the Borrower and its Subsidiaries owns or possesses or holds under valid noncancelable licenses all patents, trademarks, service marks, trade names, copyrights, licenses and other intellectual property rights that are necessary for the operation of their respective properties and businesses, and neither the Borrower nor any of its Subsidiaries are in violation of any provision thereof. The Borrower and its Subsidiaries conduct their business without infringement or claim of infringement of any material license, patent, trademark, trade name, service mark, copyright, trade secret or any other intellectual property right of others and there is no infringement or, except as set forth on Schedule 5.12, claim of infringement by others of any material license, patent, trademark, trade name, service mark, copyright, trade secret or other intellectual property right of the Borrower and its Subsidiaries. 14 Section 5.13. No Burdensome Restrictions. No contract, lease, agreement or other instrument to which the Borrower or any of its Subsidiaries are a party or by which any of their property is bound or affected, no charge, corporate restriction, judgment, decree or order and no provision of applicable law or governmental regulation have had or are reasonably expected to have a Material Adverse Effect. Section 5.14. Environmental Matters. In the ordinary course of its business, the Borrower conducts an ongoing review of the effect of Environmental Laws on the business, operations and properties of the Borrower and its Subsidiaries, in the course of which it identifies and evaluates associated liabilities and costs (including, without limitation, any capital or operating expenditures required for cleanup or closure of properties presently or previously owned, any capital or operating expenditures required to achieve or maintain compliance with environmental protection standards imposed by law or as a condition of any license, permit or contract, any related constraints on operating activities, including any periodic or permanent shutdown of any facility or reduction in the level of or change in the nature of operations conducted at any such facility, any costs or liabilities in connection with off-site disposal of wastes or Hazardous Substances, and any actual or potential liabilities to third parties, including employees, and any related costs and expenses). On the basis of this review, the Borrower has reasonably concluded that such associated liabilities and costs, including the costs of compliance with Environmental Laws, are unlikely to have a material adverse effect on the business, financial condition, results of operations or prospects of Trex Company, Inc. and its Consolidated Subsidiaries, considered as a whole. ARTICLE VI COVENANTS The Borrower agrees that, so long as the Bank has any commitment to make Revolving Loans or Term Loans hereunder or any Obligation remains unpaid: Section 6.01. Information. The Borrower will deliver or cause to be delivered to the Bank: (a) Annual Financial Statements. As soon as available and in any event within 90 days after the end of each fiscal year of the Borrower, a consolidated and consolidating balance sheet of Trex Company, Inc. and its Consolidated Subsidiaries as of the end of such fiscal year and the related consolidated and consolidating statements of income, changes in equity and cash flows for such fiscal year, setting forth in each case in comparative form the figures for the previous fiscal year, all in reasonable detail and accompanied by an opinion thereon by Ernst & Young, LLP or other independent public accountants reasonably satisfactory to the Bank, which opinion shall not be qualified as to the scope of the audit and which shall state that such consolidated financial statements present fairly the consolidated financial position of Trex Company, Inc. and its Consolidated Subsidiaries as of the date of such financial statements and the results of their operations for the period covered by such financial statements in conformity with generally accepted accounting principles applied an a consistent basis (except for changes in the application of which such accountants concur) and shall not contain any "going 15 concern" or like qualification or exception or qualification arising out of the scope of the audit. In addition, within 30 days after the end of each fiscal year, Borrower shall provide to Bank a copy of its annual plan for the next succeeding fiscal year. Within 10 days of any change to such annual plan, Borrower shall provide Bank with a copy of such change. (b) Quarterly Financial Statements. As soon as available and in any event within 45 days after the end of each of the first three fiscal quarters of each fiscal year of Trex Company, Inc., a consolidated and consolidating balance sheet of Trex Company, Inc. and its Consolidated Subsidiaries as of the end of such fiscal quarter (with all supporting schedules) and the related consolidated and consolidating statements of income, changes in equity and cash flows of Trex Company, Inc. and its Consolidated Subsidiaries for such quarter, setting forth in each case in comparative form the figures for the corresponding quarter of the previous fiscal year, all certified (subject to normal year-end audit adjustments) as to fairness of presentation, generally accepted accounting principles and consistency by the chief financial officer or chief accounting officer of Trex Company, Inc. (c) Monthly Financial Statements. As soon as available and in any event within 15 days after (i) the end of each month: (A) a Borrowing Base report and (B) a financial report of accounts receivable, inventory and production; and (ii) the end of the first two months of each fiscal quarter, a consolidated and consolidating balance sheet of Trex Company, Inc. and its Consolidated Subsidiaries and the related consolidated and consolidating statements of income, changes in equity and cash flows of Trex Company, Inc. and its Consolidated Subsidiaries for such month all certified (subject to normal year-end audit adjustments) as to fairness of presentation, generally accepted accounting principles and consistency by the chief financial officer or chief accounting officer of Trex Company, Inc. (d) Officer's Certificate. Simultaneously with the delivery of each set of financial statements referred to in subsections (a), (b) and (c) above, a certificate of the chief financial officer or chief accounting officer of Trex Company, Inc., (i) if applicable, setting forth in reasonable detail the calculations required to establish whether the Borrower was in compliance with the requirements of Sections 6.07, 6.11, 6.17 and 6.18, on the date of such financial statements, (ii) including a copy of the monthly internal memorandum setting forth in reasonable detail the business of Trex Company, Inc. and its Consolidated Subsidiaries as of the date of such certificate, (iii) stating whether there exists on the date of such certificate any Default and, if any Default then exists, setting forth the details thereof and the action which the Borrower is taking or proposes to take with respect thereto, and (iv) stating whether, since the date of the most recent previous delivery of financial statements pursuant to subsections (a) and (b) of this Section, there has been any material adverse change in the condition (financial or otherwise), results of operations, properties, assets, business or prospects of Trex Company, Inc. or of Trex Company, Inc. and its Consolidated Subsidiaries, considered as a whole, and, if so, the nature of such material adverse change. 16 (e) Accountant's Certificate. Simultaneously with the delivery of each set of financial statements referred to in subsection (a) above, a statement of the firm of independent public accountants which reported on such statements (i) whether anything has come to its attention to cause it to believe that any Default existed on the date of such statements and (ii) confirming the calculations set forth in the officer's certificate delivered simultaneously therewith pursuant to subsection (c) above. (f) Default. Forthwith upon the occurrence of any Default, a certificate of the chief financial officer or chief accounting officer of the Borrower setting forth the details thereof and the action which the Borrower is taking or proposes to take with respect thereto. (g) Litigation. As soon as reasonably practicable after obtaining knowledge of the commencement of, or of a material threat of the commencement of, an action, suit, proceeding or investigation against the Borrower or any of its Subsidiaries which could materially adversely affect the condition (financial or otherwise), results of operations, properties, assets, business or prospects of the Borrower and its Consolidated Subsidiaries, considered as a whole, or could otherwise have a Material Adverse Effect or which in any manner questions the validity of this Agreement or any of the other transactions contemplated hereby or thereby, an explanation of the nature of such pending or threatened action, suit, proceeding or investigation and such additional information as may be reasonably requested by the Bank. (h) Auditors' Management Letters. Promptly upon receipt thereof, copies of each report submitted to Trex Company, Inc. or its Consolidated Subsidiaries by independent public accountants in connection with any annual interim or special audit made by them of the books of Trex Company, Inc. or its Consolidated Subsidiaries, including, without limitation, each report submitted to Trex Company, Inc. or its Consolidated Subsidiaries concerning its accounting practices and systems and any final comment letter submitted by such accountants to management in connection with the annual audit of Trex Company, Inc. or its Consolidated Subsidiaries. (i) ERISA Matters. If and when any member of the ERISA Group (i) gives or is required to give notice to the PBGC of any "reportable event" (as defined in Section 4043 of ERISA) with respect to any Plan which might constitute grounds for a termination of such Plan under Title IV of ERISA, or knows that the plan administrator of any Plan has given or is required to give notice of any such reportable event, a copy of the notice of such reportable event given or required to be given to the PBGC; (ii) receives notice of complete or partial withdrawal liability under Title IV of ERISA or notice that any Multiemployer Plan is in reorganization, is insolvent or has been terminated, a copy of such notice; (iii) receives notice from the PBGC under Title IV of ERISA of an intent to terminate; impose liability (other than for premiums under Section 4007 of ERISA) in respect of, or appoint a trustee to administer any Plan, a copy of such notice; (iv) applies for a waiver of the minimum funding standard under Section 412 of the Internal Revenue Code, a copy of such application; (v) gives notice of intent to terminate any Plan under Section 4041(c) of ERISA, a copy of such notice and other information filed with the PBGC; (vi) gives notice of withdrawal from any Plan 17 pursuant to Section 4063 of ERISA, a copy of such notice; or (vii) fails to make any payment or contribution to any Plan or Multiemployer Plan or in respect of any Benefit Arrangement or makes any amendment to any Plan or Benefit Arrangement which has resulted or could reasonably be expected to result in the imposition of a Lien or the posting of a bond or other security, a certificate of the chief financial officer or the chief accounting officer of the Borrower setting forth details as to such occurrence and action, if any, which the Borrower or applicable member of the ERISA Group is required or proposes to take. (j) Environmental Matters. Promptly, upon receipt of any complaint, order, citation, notice or other written communication from any Person with respect to, or upon the Borrower's obtaining knowledge of, (i) the existence or alleged existence of a violation of any applicable Environmental Law in connection with any property now or previously owned, leased or operated by the Borrower or any of its Subsidiaries, (ii) any release on such property or any part thereof in a quantity that is reportable under any applicable Environmental Law and (iii) any pending or threatened proceeding for the termination, suspension or nonrenewal of any permit required under any applicable Environmental Law, in each such case under clause (i), (ii) or (iii) in which there is a reasonable likelihood of an adverse decision or determination which could result in a Material Adverse Effect. (k) Other Information. From time to time such additional financial or other information regarding the condition (financial or otherwise), results of operations, properties, assets, business or prospects of the Borrower or its Consolidated Subsidiaries as the Bank may reasonably request. Section 6.02. Payment of Obligations. The Borrower will pay and discharge, and will cause each of its Subsidiaries to pay and discharge, as the same shall become due and payable, (a) all their respective obligations and liabilities, including all claims or demands of materialmen, mechanics, carriers, warehousemen, landlords and other like persons which, in any such case, if unpaid, might by law give rise to a Lien upon any of their properties or assets and (b) all lawful taxes, assessments and charges or levies made upon their properties or assets, by any governmental body, agency or official, except where any of the items in clause (a) or (b) of this Section 6.02 may be diligently contested in good faith by appropriate proceedings and the Borrower or such Subsidiary shall have set aside on its books, if required under generally accepted accounting principles, appropriate reserves for the accrual of any such items. Section 6.03. Maintenance of Property; Insurance. (a) Maintenance of Properties. The Borrower will keep, and will cause each of its Subsidiaries to keep, all property useful and necessary in their respective businesses in good working order and condition, subject to ordinary wear and tear. (b) Insurance. The Borrower will maintain, and will cause each of its Subsidiaries to maintain, insurance with financially sound and responsible companies in such amounts (and with such risk retentions) and against such risks as is usually carried by owners of similar businesses and properties in the same general areas in which the 18 Borrower and its Subsidiaries operate. The Bank shall be named as loss payee and additional insured on such insurance policies. The Borrower will deliver to the Bank certificates evidencing that they are named as loss payee and additional insured and such other information as the Bank shall reasonably request from time to time. Section 6.04. Conduct of Business and Maintenance of Existence. The Borrower will continue, and will cause each of its Subsidiaries to continue, to engage in business of the same general type as now conducted by the Borrower and its Subsidiaries, and will preserve, renew and keep in full force and effect, and will cause each of its Subsidiaries to preserve, renew and keep in full force and effect, their respective corporate existence and their respective rights, privileges and franchises necessary or desirable in the normal conduct of business. Section 6.05. Compliance With Laws. The Borrower will comply, and will cause each of its Subsidiaries to comply, with all applicable laws, ordinances, rules, regulations and requirements of governmental authorities (including, without limitation, Environmental Laws, ERISA and the rules and regulations thereunder) except (a) where the necessity of compliance therewith is contested in good faith by appropriate proceedings or (b) where noncompliance could not reasonably be expected to have a Material Adverse Effect. Section 6.06. Accounting; Inspection of Property, Books and Records. The Borrower will keep, and will cause each of the Subsidiaries to keep, proper books of record and account in which full, true and correct entries in conformity with generally accepted accounting principles shall be made of all dealings and transactions in relation to their respective businesses and activities, will maintain, and will cause each of the Subsidiaries to maintain, their respective fiscal reporting periods on the present basis and will permit, and will cause each of their respective Subsidiaries to permit, representatives of the Bank to visit and inspect any of their respective properties, to examine and make copies from any of their respective books and records and to discuss their respective affairs, finances and accounts with their officers, employees and independent public accountants, including field audits of Accounts Receivable and Inventory, all at such reasonable times and as often as may reasonably be desired, and further, if requested, Borrower and each of its Subsidiaries shall provide equipment and real estate appraisals to the Bank for the Collateral. The costs of all field audits, inspections and appraisals will be borne by the Borrower; provided, however, that unless an Event of Default has occurred and is continuing, the Borrower shall only be responsible for the payment of one such audit, inspection or appraisal prior to December 31, 2001 and one such audit, inspection or appraisal in any twelve month period thereafter. Notwithstanding the above, the Borrower shall be permitted to make adjustments to its books of record and accounts as may be required or as may be requested by an audit or outside review, so long as the purpose of such adjustment is to bring said books or accounts into conformity with generally accepted accounting principles. Section 6.07. Minimum EBITDA. Beginning with the month ended September 30, 2001, Borrower, and its Subsidiaries, shall earn a minimum Consolidated EBITDA of $25,000,000 measured on a rolling twelve-month basis, except that Consolidated EBITDA shall not fall below (i) $22,000,000 for the twelve months ending on each of October 31, 2001, November 30, 2001 and December 31, 2001 and (ii) $20,000,000 for the twelve months ending on each of January 31, 2002, February 28, 2002 and March 31, 2002. 19 Section 6.08. Financial Advisors. On or before December 31, 2001, Borrower must hire a financial advisor acceptable to Bank in its sole but reasonable discretion. Section 6.09. Restriction on Indebtedness and Liens. The Borrower will not, and will not permit any of its Subsidiaries to, without the written permission of Bank, incur any Debt or create, incur, assume or suffer to exist any Lien upon or with respect to any Collateral, or other accounts, or ownership interests in its Subsidiaries, or proceeds thereof, or sell any Collateral, or other accounts or ownership interests in its Subsidiaries, or proceeds thereof subject to an understanding or agreement, contingent or otherwise, to repurchase such Collateral, or other accounts, or ownership interests in its Subsidiaries, or proceeds thereof (including sales of accounts receivable or notes with recourse to the Borrower or any of its Subsidiaries) or assign any right to receive income, or file or permit the filing of any financing statement under the Uniform Commercial Code as in effect in any applicable jurisdiction or any other similar notice of Lien under any similar recording or notice statute, provided that the provisions of this Section 6.09 shall not prevent the creation, incurrence, assumption or existence of the following (with such Liens described below being herein referred to as "Permitted Liens"): (a) Lien in favor of Bank of America encumbering Borrower's real property located in Lyon County, Nevada, which lien is evidenced by that certain Deed of Trust, Assignment of Rents and Leases, Security Agreement and Fixture Filing dated September 28, 1999 and recorded on September 30, 1999 in the Official Records of Lyon County, Nevada as Document No. 239622. Provided, that Borrower shall not be permitted to amend or modify the loan secured by such lien. (b) Liens created by or permitted under the Loan Documents; (c) Liens for taxes not yet due or Liens for taxes being contested in good faith and by appropriate proceedings for which adequate reserves (in the good-faith judgment of the management of the Borrower) have been established; (d) Liens imposed by law securing the charges, claims, demands or levies of carriers, warehousemen, mechanics and other like persons which were incurred in the ordinary course of business which (i) do not in the aggregate materially detract from the value of the property or assets subject to such Lien or materially impair the use thereof in the operation of the business of the Borrower or any Subsidiary or (ii) are being contested in good faith by appropriate proceedings, which proceedings have the effect of preventing the forfeiture or sale of the property or assets subject to such lien; and (e) Liens on unearned insurance premiums held by Persons financing the payment thereof. Section 6.10. Limitation on Guarantees. Neither the Borrower nor any of its Subsidiaries shall Guarantee any Debt of any Person or Persons in excess of $250,000 in the aggregate at any time. 20 Section 6.11. Limitations on Capital Expenditures. Without the prior written permission of the Bank, the Borrower and its Subsidiaries shall not make capital expenditures of more than $3,000,000, in the aggregate, in the fiscal quarter ending December 31, 2001 and will not make capital expenditures of more than $2,000,000 plus any unspent monies from prior fiscal quarters, in the aggregate in any fiscal quarter thereafter; provided, that in no event shall aggregate capital expenditures exceed $10,500,000 between October 1, 2001 and January 31, 2003. Section 6.12. Consolidations, Mergers and Sales of Assets. Neither the Borrower nor any Subsidiary will, without the prior written permission of the Bank, (a) consolidate or merge with or into any other Person or (b) sell, lease or otherwise transfer, directly or indirectly, all or substantially all of the assets of the Borrower or such Subsidiary to any other Person or Persons, provided that so long as no Default shall have occurred after giving effect thereto, (i) a Subsidiary may merge into the Borrower if the Borrower is the surviving entity, and (ii) the Borrower or any Subsidiary may merge into or consolidate with another Person if the Borrower or such Subsidiary, as the case may be, is the entity surviving such merger or consolidation. Notwithstanding the foregoing, or any other provision of this Agreement or in any of the other Loan Documents, upon thirty (30) days prior written notice to the Bank (a) TREX Company, LLC may merge into or consolidate with Trex Company, Inc., and (b) TREX Company, LLC or Trex Company, Inc. may create a wholly-owned Subsidiary (the "IP Subsidiary") and transfer thereto all patents, trademarks, copyrights and other intellectual property of the Borrower the ("IP"); provided, however, that the IP Subsidiary shall execute and deliver to the Bank a written agreement or agreements in form and substance satisfactory to the Bank, in its sole but reasonable discretion, pursuant to which the IP Subsidiary shall grant to the Bank a Lien on the IP to secure payment and performance of the Obligations. Section 6.13. Investments; Asset Acquisitions. (a) Investments. Neither the Borrower nor any Subsidiary will hold, make or acquire any Investment in any Person, except: (i) the Borrower and any Subsidiary may invest in cash and Cash Equivalents; (ii) the Borrower and any Subsidiary may acquire and hold receivables owing to them, if created or acquired in the ordinary course of business and payable or dischargeable in accordance with customary trade terms; (iii) the Borrower and any Subsidiary may acquire and own investments (including Debt obligations) received in connection with the bankruptcy or reorganization of suppliers and customers and in settlement of delinquent obligations of, and other disputes with customers and supplies arising in the ordinary course of business; 21 (iv) the Borrower and any Subsidiary may make loans and advances to any employees, current and/or prospective customers and/or vendors in the ordinary course of business, provided such loans and advances do not exceed at any time, in the aggregate, $500,000; (v) any Acquisition permitted by Section 6.13(b); (vi) Trex Company, Inc. may invest up to $300,000 in addition to its existing investment in Winchester Capital, Inc.; (vii) Trex Company, Inc. or TREX Company, LLC may invest up to $500,000 in the aggregate, in addition to the value of the intellectual property to be contributed thereto, in the IP Subsidiary; (viii) Trex Company, Inc. and TREX Company, LLC may invest in Trex Wood Polymer Espana, S.L. and one additional to-be-formed foreign sales subsidiary, provided that the total investment, exclusive of Trex Company, Inc. and TREX Company, LLC's existing investment in Trex Wood Polymer Espana, S.L., in these two Subsidiaries shall not exceed $500,000; (ix) any Subsidiary may invest in the Borrower; (x) Trex Company, Inc. may invest in TREX Company, LLC (and vice versa); (xi) Trex Wood Polymer Espana, S.L. may maintain its existing investment in DENPLAX, S.A. (b) Acquisitions. The Borrower will not, and will not permit any of its Subsidiaries to, enter into any Acquisition transaction except that the Borrower and any Subsidiary may acquire assets in the ordinary course of business for fair consideration; Section 6.14. Payments, Etc. Except as permitted below, the Borrower will not, and will not permit any of its Subsidiaries to, make any distribution, dividend, payment or delivery of property or cash on or with respect to its capital stock or its membership interests, or issue, redeem, retire, purchase or otherwise acquire, directly or indirectly, for a consideration, any membership or other interests or shares of any class of its capital stock now or hereafter outstanding (or any warrants exercisable for, or options or stock appreciation rights in respect of, any of such shares of capital stock or membership interests), or set aside any funds for any of the foregoing purposes, or permit any of its Subsidiaries to purchase or otherwise acquire for consideration any shares of capital stock or any membership interest in the Borrower or any shares of capital stock or other equity interest in any other Subsidiary, as the case may be, now or hereafter outstanding (or any options or warrants exercisable for or stock appreciation rights issued by the Borrower or any Subsidiary with respect to its capital stock or membership interests). The foregoing provisions of this Section 6.14 shall not limit or prohibit any of the following transactions: 22 (a) the payment of any distribution or dividend by any Subsidiary to Trex Company, Inc. or to TREX Company, LLC; (b) the payment by Trex Company, Inc. of a dividend on its common stock solely in shares of its common stock in connection with a split of such common stock; (c) the issuance of any Warrant and any transaction contemplated by any Warrant, including the retirement and cancellation of any existing Warrant and the issuance of new Warrants in exchange, replacement or substitution therefor and payment of cash in lieu of fractional shares of common stock of Trex Company, Inc. upon any exercise of any Warrant; (d) the issuance by Trex Company, Inc. of shares of its common stock and options to purchase its common stock pursuant to its employee stock purchase plan and stock option and incentive plan for up to the number of shares of common stock authorized by such plans as of the date hereof; or (e) any transaction which is expressly permitted by Section 6.12 or Section 6.13. Section 6.15. Use of Proceeds. The proceeds of the Revolving Loans made under this Agreement will be used by the Borrower for permanent working capital financing of the Borrower's accounts receivable and inventory, to purchase equipment and/or other general corporate purposes. The proceeds of Term Loan A made under this Agreement were used by the Borrower to purchase equipment and/or other general corporate purposes. No such use of the proceeds for general corporate purposes will be, directly or indirectly, for the purpose, whether immediate, incidental or ultimate, of buying or carrying any "margin stock" within the meaning of Regulation U. Section 6.16. Transactions With Other Persons. The Borrower will not, and will not permit any of its Subsidiaries to, enter into any agreement with any Person whereby any of them shall agree to any restriction on the right of the Borrower or any of its Subsidiaries to amend or waive any of the provisions of this Agreement or any other Loan Document. Section 6.17. Limitations on Debt. The Borrower will not as of the end of any month permit the ratio of Total Consolidated Debt to Total Consolidated Capitalization, as a percentage, to exceed 55%. Section 6.18. Funded Debt Coverage Ratio. The Borrower will not, as of the end of any fiscal quarter, permit the ratio of the Total Consolidated Debt to Consolidated EBITDA for the four quarter period ended as of the end of such fiscal quarter to exceed 4.0:1.0 through June 30, 2002 and 3.0:1.0 for all testing periods thereafter. Section 6.19. Location of Finished Goods Inventory. The Borrower will store all finished goods Inventory at a location owned by Borrower or its Subsidiaries. In the event that Borrower wishes to store any finished goods Inventory at a location not owned by Borrower or its Subsidiaries, Borrower will obtain a waiver from each landlord of such a location, in form and 23 substance satisfactory to the Bank in its sole but reasonable discretion, by which such landlord waives its rights, if any, in the finished goods Inventory stored at such location. Section 6.20. Deposit Accounts. To facilitate the administration of the Loans, the Borrower and its Subsidiaries shall maintain all of their operating deposit accounts with the Bank and if requested by the Bank will establish and maintain a lock box cash management system in an assignee account at the Bank. Notwithstanding the foregoing, Borrower or its Subsidiaries may maintain one general operating depository account in each of Fernley, Nevada and Almeria, Spain; provided that, if at any time the balance in the operating depository account in Fernley, Nevada exceeds $100,000 the Bank shall be entitled to a first priority security interest therein and Borrower shall take such actions as are necessary to perfect such security interest. Section 6.21. Warrants. On or before the Closing Date, Trex Company, Inc. shall issue to the Bank a warrant for the purchase of up to 707,557 shares of the common stock of Trex Company, Inc. at a price per share based on the average market price (as defined in such warrant) of the common stock for the 20 consecutive trading days beginning on October 30, 2001. Notwithstanding the foregoing, and as provided for in the warrant, if the Obligations, exclusive of the ISDA Master Agreement and Real Estate Term Loans 1, 2 & 3, are paid in full on or before June 30, 2002, such warrant shall be exercisable for a maximum of 353,779 shares of common stock of Trex Company, Inc. Trex Company, Inc. shall also agree in the Registration Agreement to provide the Bank with registration rights with respect to Bank's resale of any common stock issued upon exercise of such warrant. This agreement shall be further evidenced by the Warrant and Registration Agreement to be delivered on the Closing Date. By its acceptance of the Warrant, the Bank shall be deemed to have made the representations and warranties contained in Section 3 thereof. Section 6.22. Commitment Fee. Borrower hereby agrees to pay the Commitment Fee to the Bank. Section 6.23. Independence of Covenants. All covenants contained herein shall be given independent effect so that if a particular action or condition is not permitted by any of such covenants, the fact that such action or condition would be permitted by an exception to, or otherwise be within the limitations of, another covenant shall not avoid the occurrence of a Default if such action is taken or condition exists. ARTICLE VII DEFAULTS Section 7.01. Events of Default. If one or more of the following events ("Events of Default") shall have occurred and be continuing: (a) the Borrower shall fail to pay, within five days after the date when due, any principal, interest, fee or any other amount payable hereunder or under the Notes, the ISDA Master Agreement or the Letters of Credit; (b) the Borrower shall fail to pay the Commitment Fee or the Unused Commitment Fee when due; 24 (c) the Borrower shall fail to observe or perform any covenant or agreement contained in this Agreement, except those covenants or agreements contained in Sections 6.01, 6.02, 6.03, 6.05, 6.13, 6.16 and 6.20 hereof; (d) the Borrower shall fail, after fifteen (15) days written notice thereof from Bank to observe or perform the covenants and agreements contained in Sections 6.01, 6.02, 6.03, 6.05, 6.13, 6.16 and 6.20 hereof; (e) any representation, warranty, certification or statement made by the Borrower in this Agreement or in any certificate, financial statement or other document delivered pursuant hereto or thereto shall prove to have been incorrect in any material respect when made; (f) the Borrower or any Subsidiary shall fail to make any payment or perform any collateralization obligation in respect of any Material Financial Obligations when due or within any applicable grace period; (g) any event or condition shall occur which results in the acceleration of the maturity of any Material Debt of the Borrower or any Subsidiary or enables (or, with the giving of notice or lapse of time or both, would enable) the holder of such Material Debt or any Person acting on such holder's behalf to accelerate the maturity thereof; (h) the Borrower or any Subsidiary shall commence a voluntary case or other proceeding seeking liquidation, reorganization or other relief with respect to itself or its debts under any bankruptcy, insolvency or other similar law now or hereafter in effect or seeking the appointment of a trustee, receiver, liquidator, custodian or other similar official of it or any substantial part of its property, or shall consent to any such relief or to the appointment of or taking possession by any such official in an involuntary case or other proceeding commenced against it, or shall make a general assignment for the benefit of creditors, or shall fail generally to pay its debts as they become due, or shall take any corporate action to authorize any of the foregoing; (i) an involuntary case or other proceeding shall be commenced against the Borrower or any Subsidiary seeking liquidation, reorganization or other relief with respect to it or its debts under any bankruptcy, insolvency or other similar law now or hereafter in effect or seeking the appointment of a trustee, receiver, liquidator, custodian or other similar official of it or any substantial part of its property, and such involuntary case or other proceeding shall remain undismissed and unstayed for a period of 90 days; or an order for relief shall be entered against the Borrower or any Subsidiary under the federal bankruptcy laws as now or hereafter in effect; (j) any member of the ERISA Group shall fail to pay when due an amount or amounts aggregating in excess of $25,000 which it shall have become liable to pay under Title IV of ERISA or notice of intent to terminate a Material Plan shall be filed under Title IV of ERISA by any member of the ERISA Group, any plan administrator or any combination of the foregoing; or the PBGC shall institute proceedings under Title IV of ERISA to terminate, to impose liability (other than for premiums under Section 4007 of 25 ERISA) in respect of, or to cause a trustee to be appointed to administer any Material Plan; or a condition shall exist by reason of which the PBGC would be entitled to obtain a decree adjudicating that any Material Plan must be terminated; or there shall occur a complete or partial withdrawal from, or default, within the meaning of Section 4219(c)(5) of ERISA, with respect to one or more Multiemployer Plans which could reasonably be expected to cause one or more members of the ERISA Group to incur a current payment obligation in excess of $25,000; (k) one or more judgments or orders for the payment of money in excess of $25,000 in the aggregate shall be rendered against the Borrower or any Subsidiary of the Borrower and such judgments or orders shall continue unsatisfied and unstayed for a period of 30 days; or (l) a Change of Control shall have occurred; then, and in every such event, while such event is continuing, the Bank may (i) by notice to the Borrower terminate the Commitment and it shall thereupon terminate, and (ii) by notice to the Borrower declare the Obligations (together with accrued interest thereon) to be, and the Obligations shall thereupon become, immediately due and payable without presentment, demand, protest or other notice of any kind (except as set forth in clause (i) above), all of which are hereby waived by the Borrower, provided that in the case of any Default or any Event of Default specified in Section 7.01(h) or (i) above with respect to the Borrower, without any notice to the Borrower or any other act by the Bank, the commitment to make Revolving Loans and Term Loans shall thereupon terminate and the Obligations (together with accrued interest and accrued and unpaid fees thereon) shall become immediately due and payable without presentment, demand, protest or other notice of any kind, all of which are hereby waived by the Borrower. In addition to any rights now or hereafter granted under applicable law or otherwise, and not by way of limitation of any such rights, upon the occurrence of an Event of Default, the Bank is authorized at any time and from time to time, without presentment, demand, protest or other notice of any kind (all of which rights being hereby expressly waived), to set off and to appropriate and apply any and all deposits and any other indebtedness at any time held or owing by the Bank to or for the credit or the account of the Borrower against obligations and liabilities of the Borrower to the Bank hereunder, under the Notes, or the other Loan Documents. ARTICLE VIII CHANGE IN CIRCUMSTANCES Section 8.01. Illegality. If, on or after the date of this Agreement, the adoption of any applicable law, rule or regulation, or any change in any applicable law, rule or regulation, or any change in the interpretation or administration thereof by any governmental authority, central bank or comparable agency charged with the interpretation or administration thereof, or compliance by the Bank with any request or directive (whether or not having the force of law) of any such authority, central bank or comparable agency, shall make it unlawful or impossible for the Bank to make, maintain or fund Loans and the Bank shall so notify the Borrower, until the Bank notifies the Borrower that the circumstances giving rise to such suspension no longer exist, each Loan then outstanding which bears interest at LIBOR or the LIBOR Market Index-Based 26 Rate shall be converted immediately to a Base Rate Loan and all new Loans shall be Base Rate Loans. Section 8.02. Base Rate Loans Substituted for Affected LIBOR Market Index-Based Loans. Upon the occurrence of any event or condition set forth in Section 8.01, each Loan then outstanding which bears interest at LIBOR or the LIBOR Market Index-Based Rate shall be converted immediately to a Base Rate Loan and all new Loans shall be Base Rate Loans. If the Bank notifies the Borrower that the circumstances giving rise to such change in interest rate no longer apply, the principal amount of each such Base Rate Loan shall cease immediately to constitute a Base Rate Loan and shall thereafter bear interest in accordance with Section 2.06. ARTICLE IX MISCELLANEOUS Section 9.01. Notices. Unless otherwise specified herein, all notices, requests and other communications to a party hereunder shall be in writing (including bank wire, facsimile transmission or similar writing) and shall be given to such party: (a) at its address or facsimile number set forth on the signature pages hereof, or (b) at such other address, facsimile number or telex number as such party may hereafter specify for the purpose of communication hereunder by notice to the other party hereto. Each such notice, request or other communication shall be effective (i) if given by facsimile transmission, when transmitted to the facsimile number specified in this Section and confirmation of receipt is received, (ii) if given by mail, 72 hours after such communication is deposited in the mails, certified mail, return receipt requested, with appropriate first-class postage prepaid, addressed as specified in this Section, or (iii) if given by any other means, when delivered at the address specified in this Section 9.01. Rejection or refusal to accept or the inability to deliver because of a changed address of which no notice was given shall not affect the validity of notice given in accordance with this Section. Section 9.02. Release and Waiver. Borrower hereby releases the Bank and its officers, employees and agents from any and all liability, claims, known or unknown related to this Agreement or otherwise. In the event any Borrower is the subject of any insolvency, bankruptcy, receivership, dissolution, reorganization or similar proceeding, Federal or State, voluntary or involuntary, under any present or future law or act, Borrower hereby agrees that in consideration for the restructuring of the Loan Documents being made herein, Bank shall be and hereby is entitled to the automatic and absolute lifting of any automatic stay or other form of injunction so as to allow for the immediate enforcement of its remedies under the Loan Documents and any applicable law, including without limitation, the automatic and absolute lifting of the automatic stay imposed by ss. 362 of the United States Bankruptcy Code. Section 9.03. No Waivers. No failure by either party to exercise, no course of dealing with respect to, and no delay in exercising any right, power or privilege hereunder or under the Notes shall operate as a waiver thereof, nor shall any single or partial exercise thereof preclude any other or further exercise thereof or the exercise of any other right, power or privilege. The rights and remedies provided herein shall be cumulative and not exclusive of any rights or remedies provided by law. 27 Section 9.04. Expenses. The Borrower shall pay (i) all reasonable out-of-pocket expenses of the Bank, including reasonable fees and disbursements of special and local counsel for the Bank, in connection with the preparation and administration of this Agreement and the other Loan Documents, any waiver or consent thereunder or any amendment thereof or any Default or alleged Default thereunder and (ii) if an Event of Default occurs, all reasonable out-of-pocket expenses incurred by the Bank, including (without duplication) the reasonable fees and disbursements of outside counsel, in connection with such Event of Default and collection, bankruptcy, insolvency and other enforcement proceedings resulting therefrom. Section 9.05. Amendments and Waivers. Any provision of this Agreement or the Notes may be amended or waived if, but only if, such amendment or waiver is in writing and is signed by the Borrower and the Bank. Section 9.06. Successors and Assigns. The provisions of this Agreement shall be binding upon and inure to the benefit of the parties hereto and their respective successors and assigns, except that the Borrower may not assign or otherwise transfer any of its rights under this Agreement without the prior written consent of the Bank, except as may be permitted pursuant to Section 6.12 hereof. The Bank shall have the right to assign or otherwise transfer any of its rights under this Agreement or the Loan Documents; provided, however, that transfer of any of Bank's rights with respect to the Revolving Loans shall require the prior written consent of Borrower which consent shall not be unreasonably withheld or delayed. Section 9.07. Governing Law. This Agreement and the Notes shall be governed by and construed in accordance with the laws of the Commonwealth of Virginia. Section 9.08. Arbitration; Submission to Jurisdiction. (a) Upon demand of any party hereto, whether made before or after institution of any judicial proceeding, any claim or controversy arising out of or relating to the Loan Documents between the parties hereto (a "Dispute") shall be resolved by binding arbitration conducted under and governed by the Commercial Financial Disputes Arbitration Rules (the "Arbitration Rules") of the American Arbitration Association (the "AAA") and the Federal Arbitration Act. Disputes may include, without limitation, tort claims, counterclaims, disputes as to whether a matter is subject to arbitration, claims brought as class actions, or claims arising from documents executed in the future. A judgment upon the award may be entered in any court having jurisdiction. Notwithstanding the foregoing, this arbitration provision does not apply to disputes under or related to swap agreements. (b) All arbitration hearings shall be conducted in the city in which the office of the Bank set forth on the signature page hereof is located. A hearing shall begin within 90 days of demand for arbitration and all hearings shall be concluded within 120 days of demand for arbitration. These time limitations may not be extended unless a party shows cause for extension and then for no more than a total of 60 days. The expedited procedures set forth in Rule 51 et seq. of the Arbitration Rules shall be applicable to claims of less than $1,000,000. Arbitrators shall be licensed attorneys selected from the 28 Commercial Financial Dispute Arbitration Panel of the AAA. The parties do not waive applicable federal or state substantive law except as provided herein. (c) Notwithstanding the preceding binding arbitration provisions, the parties agree to preserve, without diminution, certain remedies that any party may exercise before or after an arbitration proceeding is brought. The parties shall have the right to proceed in any court of proper jurisdiction or by self-help to exercise or prosecute the following remedies, as applicable: (i) all rights to foreclose against any real or personal property or other security by exercising a power of sale or under applicable law by judicial foreclosure, including a proceeding to confirm the sale; (ii) all rights of self-help, including peaceful occupation of real property and collection of rents, setoff and peaceful possession of personal property; (iii) obtaining provisional or ancillary remedies, including injunctive relief, sequestration, garnishment, attachment, appointment of receiver and filing an involuntary bankruptcy proceeding; and (iv) when applicable, a judgment by confession of judgment. Any claim or controversy with regard to the parties' entitlement to such remedies is a Dispute. (d) Each party agrees that it shall not have a remedy of punitive or exemplary damages against the other in any Dispute and hereby waives any right or claim to punitive or exemplary damages it may have now or which may arise in the future in connection with any Dispute, whether the Dispute is resolved by arbitration or judicially. (e) The parties acknowledge that by agreeing to binding arbitration they have irrevocably waived any right they may have to a jury trial with regard to a Dispute. Section 9.09. Counterparts; Integration; Effectiveness. This Agreement may be signed in any number of counterparts, each of which shall be an original, with the same effect as if the signatures thereto and hereto were upon the same instrument. Each of this Agreement, the Notes and the other Loan Documents shall be deemed to incorporate the other of said documents by reference and all of said documents shall constitute the entire agreement and understanding among the parties hereto and supersede any and all prior agreements and understandings, oral or written, relating to the subject matter hereof. This Agreement shall become effective upon receipt by the Bank of counterparts hereof signed by each of the parties hereto. Section 9.10. Confidentiality. The Bank agrees to hold all nonpublic information obtained pursuant to the requirements of this Agreement in accordance with its customary procedure for handling confidential information of this nature and in accordance with safe and sound banking practices, provided that nothing herein shall prevent the Bank from disclosing such information (a) to any other Person if reasonably incidental to the administration of the Loans, (b) upon the order of any court or administrative agency, (c) upon the request or demand of any regulatory agency or authority, (d) which had been publicly disclosed other than as a result of a disclosure by the Bank prohibited by this Agreement, (e) in connection with any litigation to which the Bank or its subsidiaries or parent may be a party, (f) to the extent necessary in connection with the exercise of any remedy hereunder and (g) to the Bank's legal counsel and independent auditors. 29 Section 9.11. Severability; Modification. If any provision hereof is invalid or unenforceable in any jurisdictions, then, to the fullest extent permitted by law, (a) the other provisions hereof shall remain in full force and effect in such jurisdiction; and (b) the invalidity or unenforceability of any provision hereof in any jurisdiction shall not affect the validity or enforceability of such provisions in any other jurisdiction. [Signatures on Following Page] 30 IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be duly executed by their respective authorized officers as of the day and year first above written. TREX COMPANY, LLC 160 Exeter Drive Winchester, VA 22603-8605 Facsimile: (540) 542-6889 By /s/ Anthony J. Cavanna --------------------------------------- Anthony J. Cavanna, Executive Vice President; Chief Financial Officer; Treasurer TREX COMPANY, INC. 160 Exeter Drive Winchester, VA 22603-8605 Facsimile: (540) 542-6889 By /s/ Robert G. Matheny --------------------------------------- Robert G. Matheny, President FIRST UNION NATIONAL BANK 301 South College Street, DC-5 One First Union -- 5th Floor Charlotte, NC 28288-0760 Facsimile: (704) 374-6319 By /s/ Barbara Gell Carroll --------------------------------------- Name/Title Barbara Gell Carroll, ------------------------------ Senior Vice President/Director ------------------------------------------ 31 DEFINITIONS APPENDIX The definitions set forth in this Definitions Appendix are incorporated by reference into Section 1.01 of the Second Amended and Restated Credit Agreement dated as of September 30, 2001 among TREX Company, LLC, Trex Company, Inc. and First Union National Bank (as the same may be amended, modified or supplemented from time to time, the "Credit Agreement"). Reference in this Definitions Appendix to "this Agreement," "herein," "hereof," "hereunder" and to any Article or Section shall be interpreted to mean the Credit Agreement and the referenced Article or Section, including this Definitions Appendix. DEFINITIONS "Accounts" means all "accounts" (as defined in the UCC) now owned or hereafter acquired by the Borrower, and shall also mean and include all accounts receivable, contract rights, book debts, notes, drafts and other obligations or indebtedness owing to the Borrower arising from the sale, lease or exchange of goods or other property by it and/or the performance of services by it (including, without limitation, any such obligation which might be characterized as an account, contract right or general intangible under the Uniform Commercial Code in effect in any jurisdiction) and all of the Borrower's rights in, to and under all purchase orders for goods, services or other property, and all of the Borrower's rights to any goods, services or other property represented by any of the foregoing (including returned or repossessed goods and unpaid seller's rights of rescission, replevin and reclamation and rights to stoppage in transit) and all moneys due to or to become due to the Borrower under all contracts for the sale, lease or exchange of goods or other property and/or the performance of services by it (whether or not yet earned by performance on the part of the Borrower), in each case whether now in existence or hereafter arising or acquired, including, without limitation, the right to receive the proceeds of said purchase orders and contracts and all collateral security and guarantees of any kind given by any Person with respect to any of the foregoing. "Acquisition," by any Person (herein called the "Acquiror"), means any transaction involving the purchase, lease or other acquisition by such Acquiror of any or all of the capital stock or assets of another Person that, for purposes of preparing a statement of cash flows for such Acquiror prepared in accordance with GAAP, would be considered "investing activity." "Affiliate" means (a) any Person that directly, or indirectly through one or more intermediaries, controls the Borrower (a "Controlling Person") or (b) any Person (other than the Borrower or a Subsidiary) which is controlled by or is under common control with a Controlling Person. As used herein, the term "control" means possession, directly or indirectly, of the power to direct or cause the direction of the management or policies of a Person, whether through the ownership of voting securities, by contract or otherwise. "Agreement" means this Second Amended and Restated Credit Agreement, as it may be amended, modified or supplemented from time to time. "Bank" means First Union National Bank, a national banking association, and its successors and assigns. 32 "Base Rate" means, for any day, the Prime Rate for such day plus 1% as adjusted by the Variance. "Base Rate Loan" means a Loan which bears interest at the Base Rate. "Benefit Arrangement" means at any time an employee benefit plan within the meaning of Section 3(3) of ERISA which is not a Plan or a Multiemployer Plan and which is maintained or otherwise contributed to by any member of the ERISA Group. "Borrower" means TREX Company, LLC, a Delaware limited liability company, Trex Company, Inc., a Delaware corporation and their successors. "Business Day" means any day except a Saturday, Sunday or other day on which commercial banks in the Commonwealth of Virginia are authorized by law to close. "Capital Lease" means, at any time, a lease with respect to which the lessee is required concurrently to recognize the acquisition of an asset and the incurrence of a liability in accordance with GAAP. "Cash Equivalents" means (a) direct obligations of the United States or any agency thereof, or obligations guaranteed by the United States of any agency thereof, (b) commercial paper rated in the highest grade by a nationally recognized credit rating agency or (c) time deposits with, including certificates of deposit issued by, any office located in the United States of any bank or trust company which is organized under the laws of the United States or any state thereof and has capital, surplus and undivided profits aggregating at least $250,000,000, provided in each case that such investment matures within one year from the date of acquisition thereof by the Borrower. "Change of Control" means any event or condition a result of which is that (a) Anthony J. Cavanna, Roger A. Wittenberg, Robert G. Matheny and Andrew U. Ferrari (or any of their current or former spouses, lineal descendents, current or former spouses of any such lineal descendents, or any trust or other Person controlled by any of the foregoing) cease, as a group, to own beneficially at least 25% of the voting common stock of Trex Company, Inc.; or (b) TREX Company, Inc. ceases to own beneficially all of the membership interests in TREX Company, LLC. "Closing Date" means the date, not later than November 9, 2001, on which the Bank determines that the conditions specified in or pursuant to Section 4.01 have been satisfied. "Collateral" means the real estate, and improvements thereon, of the Borrower as more particularly described in those certain Deeds of Trust dated as of the date hereof and all other collateral described in the Security Agreement. "Commitment Fee" means the $100,000 fee due upon the execution of this Agreement and the $200,000 fee due to the Bank if the Obligations, exclusive of the ISDA Master Agreement and Real Estate Term Loans 1, 2 & 3, are not paid in full on or before June 30, 2002. 33 "Consolidated EBITDA" means as of the date of determination, the total earnings before interest and taxes plus depreciation and amortization of the Borrower and its Consolidated Subsidiaries determined on a consolidated basis as of such date. "Consolidated Debt" means at any date the Debt of the Borrower and its Consolidated Subsidiaries, determined on a consolidated basis as of such date. "Consolidated Net Worth" means, as of the date of determination: (i) the total assets of the Borrower and its Subsidiaries which would be shown as assets on a consolidated balance sheet of the Borrower and its Subsidiaries as of such time prepared in accordance with GAAP, after eliminating all amounts properly attributable to minority interests, if any, in the stock and surplus of Subsidiaries; minus (ii) the total liabilities of the Borrower and its Subsidiaries which would be shown as liabilities on a consolidated balance sheet of the Borrower and its Subsidiaries as of such time prepared in accordance with GAAP. "Consolidated Subsidiary" means with respect to any Person at any date any Subsidiary of such Person or other entity the accounts of which would be consolidated with those of such Person in its consolidated financial statements if such statements were prepared as of such date in accordance with GAAP. "Debt" of any Person means, at any date, without duplication, (a) all obligations of such Person for borrowed money, (b) all obligations of such Person evidenced by bonds, debentures, notes or other similar instruments, (c) all obligations of such Person to pay the deferred purchase price of property or services (other than trade accounts payable arising in the ordinary course of business), (d) all obligations of such Person as lessee under Capital Leases, (e) all obligations of such Person to purchase securities or other property which arise out of or in connection with the sale of the same or substantially similar securities or property, (f) all noncontingent obligations (and, for purposes of Section 6.09 and the definitions of Material Debt and Material Financial Obligations, all contingent obligations) of such Person to reimburse any bank or other person in respect of amounts paid under a letter of credit, bankers' acceptance or similar instrument, (g) all obligations of others secured by a Lien on any asset of such Person, whether or not such obligation is assumed by such Person, and (h) all obligations of others Guaranteed by such Person; provided, however, that Debt shall not include (i) indebtedness incurred in connection with the financing of insurance premiums, (ii) obligations of TREX Company, LLC as borrower and Trex Company, Inc. as guarantor with respect to the indebtedness secured by the Permitted Lien identified in Section 6.09(a) of the Credit Agreement, and (iii) Guarantees of obligations of TREX Company, LLC or Trex Company, Inc. "Default" means any condition or event which constitutes an Event of Default or which with the giving of notice or lapse of time or both would, unless cured or waived, become an Event of Default. "Derivatives Obligations" of any Person means all obligations of such Person in respect of any rate swap transaction, basis swap, forward rate transaction, commodity swap, commodity option, equity or equity index swap, equity or equity index option, bond option, interest rate 34 option, foreign exchange transaction, cap transaction, floor transaction, collar transaction, currency swap transaction, cross-currency rate swap transaction, currency option or any other similar transaction (including any option with respect to any of the foregoing transactions) or any combination of the foregoing transactions. "Dollars" and the sign "$" means lawful money of the United States of America. "Effective Date" means September 30, 2001. "Environmental Laws" means any and all federal, state, local and foreign statutes, laws, regulations, ordinances, rules, judgments, orders, decrees, permits, concessions, grants, franchises, licenses, agreements or other governmental restrictions relating to the environment or to emissions, discharges or releases of pollutants, contaminants, petroleum or petroleum products, chemicals or industrial, toxic or hazardous substances or wastes into the environment, including, without limitation, ambient air, surface water, groundwater or land, or otherwise relating to the manufacture, processing, distribution, use, treatment, storage, disposal, transport or handling of pollutants, contaminants, petroleum or petroleum products, chemicals or industrial, toxic or hazardous substances or wastes or the cleanup or other remediation thereof. "ERISA" means the Employee Retirement Income Security Act of 1974, as amended, or any successor statute. "ERISA Group" means the Borrower, any Subsidiary and all members of a controlled group of corporations and all trades or businesses (whether or not incorporated) under common control which, together with the Borrower or any Subsidiary, are treated as a single employer under Section 414 of the Internal Revenue Code. "Event of Default" has the meaning set forth in Section 7.01. "GAAP" means generally accepted accounting principles as in effect from time to time in the United States of America. "Guarantee" by any Person means any obligation, contingent or otherwise, of such Person directly or indirectly guaranteeing any Debt or other obligation of any other Person and, without limiting the generality of the foregoing, any obligation, direct or indirect, contingent or otherwise, of such Person (a) to purchase or pay (or advance or supply funds for the purchase or payment of) such Debt or other obligation (whether arising by virtue of partnership arrangements, by agreement to keep-well, to purchase assets, goods, securities or services, to take-or-pay, or to maintain financial statement conditions or otherwise) or (b) entered into for the purpose of assuring in any other manner the obligee of such Debt or other obligation of the payment thereof or to protect such obligee against loss in respect thereof (in whole or in part), provided that the term "Guarantee" shall not include endorsements for collection or deposit in the ordinary course of business. The term "Guarantee" used as a verb has a corresponding meaning. "Hazardous Substances" means any toxic, radioactive, caustic or otherwise hazardous substance, including petroleum, its derivatives, by-products and other hydrocarbons, or any substance having any constituent elements displaying any of the foregoing characteristics. 35 "Internal Revenue Code" means the Internal Revenue Code of 1986, as amended, or any successor statute. "Inventory" means all "inventory" (as defined in the UCC) now owned or hereafter acquired by the Borrower, wherever located, and shall also mean and include, without limitation, all raw materials and other materials and supplies, work-in-process and finished goods and any products made or processed therefrom and all substances, if any, commingled therewith or added thereto. "Investment" means any investment in any Person, whether by means of share purchase capital contribution, loan, time deposit or otherwise. "ISDA Master Agreement" means that certain agreement between Trex Company, LLC and Bank dated as of March 20, 1998, and all amendments thereto and transactions thereunder. "Item" means any "item" as defined in Section 4-104 of the UCC and shall also mean and include checks, drafts, money orders or other media of payment. "Letter of Credit SM413821" means that certain irrevocable standby letter of credit for the benefit of Treasurer, County of Frederick, Virginia with in the amount of $108,756. "LIBOR" has the meaning set forth in Section 2.06(c). "LIBOR Market Index-Based Rate" has the meaning set forth in Section 2.06(b). "Lien" means, with respect to any asset, any mortgage, lien, pledge, charge, security interest or encumbrance of any kind in respect of such asset. For the purposes of this Agreement, the Borrower or any Subsidiary shall be deemed to own subject to a Lien any asset which it has acquired or holds subject to the interest of a vendor or lessor under any conditional sale agreement, Capital Lease or other title retention agreement relating to such asset. "Loan Documents" means the Credit Agreement, the Mortgage the Notes and the Security Agreement, collectively, and "Loan Document" means any of them. "Loans" means the Revolving Loans, Term Loan A and Real Estate Term Loans 1, 2 & 3 made or existing pursuant to Section 2.01 and Section 2.02. "Material Adverse Effect" means (a) any material adverse effect upon the condition (financial or otherwise), results of operations, properties, assets, business or prospects of the Borrower or of the Borrower and its Consolidated Subsidiaries, taken as a whole; (b) a material adverse effect on the ability of the Borrower to consummate the transactions contemplated hereby to occur on the Closing Date; (c) a material adverse effect on the ability of the Borrower to perform its obligations under this Agreement and the Notes; or (d) a material adverse effect on the rights and remedies of the Bank under this Agreement and the Notes. "Material Debt" means Debt (other than the Notes) of the Borrower and/or one or more of its Subsidiaries, arising in one or more related or unrelated transactions, in an aggregate principal or face amount exceeding $250,000. 36 "Material Financial Obligations" means a principal or face amount of Debt and/or payment obligations in respect of Derivatives Obligations of the Borrower and/or one or more of its Subsidiaries, arising in one or more related or unrelated transactions, exceeding in the aggregate $250,000. "Material Plan" means at any time a Plan or Plans having aggregate Unfunded Liabilities in excess of $25,000. "Mortgage" means those certain Deed Of Trusts, Security Agreement, And Absolute Assignment Of Leases to be filed in Virginia and Nevada pursuant to Section 3 hereof. "Multiemployer Plan" means at any time an employee pension benefit plan within the meaning of Section 4001(a)(3) of ERISA to which any member of the ERISA Group is then making or accruing an obligation to make contributions or has within the preceding five plan years made contributions, including for these purposes any Person which ceased to be a member of the ERISA Group during such five-year period. "Notes" means the Revolving Note, Term Loan A Note, Real Estate Term Loan 1 Note, Real Estate Term Loan 2 Note, and Real Estate Term Loan 3 Note. "Notice of Borrowing" means a Notice of Borrowing (as defined in Section 2.03(a)). "Obligations" means: (i) all principal of and interest (including, without limitation, any interest which accrues after the commencement of any case, proceeding or other action relating to the bankruptcy, insolvency or reorganization of the Borrower, whether or not allowed or allowable as a claim in any such proceeding) on any Real Estate Term Loan, Term Loan A, Revolving Loan, ISDA Master Agreement, Letter of Credit SM413821, fees payable or reimbursement obligation under, or any note issued pursuant to, this Agreement or any other Loan Document; (ii) all other amounts now or hereafter payable by the Borrower and all other obligations or liabilities now existing or hereafter arising or incurred (including, without limitation, any amounts which accrue after the commencement of any case, proceeding or other action relating to the bankruptcy, insolvency or reorganization of the Borrower, whether or not allowed or allowable as a claim in any such proceeding) on the part of the Borrower pursuant to this Agreement or any other Loan Document; (iii) all Derivatives Obligations (including, without limitation, any amounts which accrue after the commencement of any case, proceeding or other action relating to the bankruptcy, insolvency or reorganization of the Borrower, whether or not allowed or allowable as a claim in any such proceeding) of the Borrower to the Bank; (iv) all other indebtedness, obligations and liabilities of the Borrower to the Bank, now existing or hereafter arising or incurred, whether or not evidenced by notes or other instruments, and whether such indebtedness, obligations and liabilities are direct or 37 indirect, fixed or contingent, liquidated or unliquidated, due or to become due, secured or unsecured, joint, several or joint and several, related to the Loans; together in each case with all renewals, modifications, consolidations or extensions thereof. "Operating Account" means the demand deposit account maintained with the Bank by the Borrower on which the Borrower draws checks to pay its operating expenses, which account is linked to the cash management services provided by the Bank to the Borrower pursuant to the Services Agreement. "PBGC" means the Pension Benefit Guaranty Corporation or any entity succeeding to any or all of its functions under ERISA. "Perfection Certificate" means a certificate of the Borrower, substantially in the form of Exhibit A to the Security Agreement, completed and supplemented with the schedules and attachments contemplated thereby to the satisfaction of the Bank, and duly executed by the chief executive officer, president or chief financial officer of the Borrower. "Permitted Liens" has the meaning set forth in Section 6.09. "Person" means an individual, a corporation, a partnership, an association, a trust or any other entity or organization, including a government or political subdivision or an agency or instrumentality thereof. "Plan" means at any time an employee pension benefit plan (other than a Multiemployer Plan) which is covered by Title IV of ERISA or subject to the minimum funding standards under Section 412 of the Internal Revenue Code and either (i) is maintained, or contributed to, by any member of the ERISA Group for employees of any member of the ERISA Group or (ii) has at any time within the preceding five years been maintained, or contributed to, by any Person which was at such time a member of the ERISA Group for employees of any Person which was at such time a member of the ERISA Group. "Prime Rate" means the rate announced by the Bank from time to time, as its Prime Rate, as such rate may change from time to time with changes to occur on the date the Bank's Prime Rate changes. The Bank's Prime Rate is one of several interest rate bases used by the Bank. The Bank lends at rates above and below the Bank's Prime Rate, and the Borrower acknowledges that the Bank's Prime Rate is not represented or intended to be the lowest or most favorable rate of interest offered by the Bank. "Proceeds" means all proceeds of, and all other profits, products, rents or receipts, in whatever form, arising from the collection, sale, lease, exchange, assignment, licensing or other disposition of or other realization upon or payment for the use of, Collateral (as that term is defined in the Security Agreement, including (without limitation) all claims of the Borrower against third parties for loss of, damage to or destruction of or for proceeds payable under, or unearned premiums with respect to, policies of insurance in respect of, any Collateral, and any condemnation or requisition payments with respect to any Collateral, in each case whether now existing or hereafter arising. 38 "Quarterly Date" means the first Business Day of each January, April, July and October. "Real Estate Term Loan 1 " means the $3,780,000 loan made by Bank to Borrower on June 15, 1998. "Real Estate Term Loan 2" means the $1,035,000 loan made by Bank to Borrower on November 20, 1998. "Real Estate Term Loan 3" means the $5,940,000 loan made by Bank to Borrower on August 15, 2000. "Real Estate Term Loan 1 Note" means the amended and restated promissory note of the Borrower evidencing the obligation of the Borrower to repay Real Estate Term Loan 1. "Real Estate Term Loan 2 Note" means the amended and restated promissory note of the Borrower evidencing the obligation of the Borrower to repay Real Estate Term Loan 2. "Real Estate Term Loan 3 Note" means the amended and restated promissory note of the Borrower evidencing the obligation of the Borrower to repay Real Estate Term Loan 3. "Registration Agreement" means the Registration Rights Agreement between Trex Company, Inc. and the Bank dated as of November 13, 2001 requiring Trex Company, Inc. to register the common stock acquired by the Bank pursuant to any Warrants. "Regulation U" means Regulation U of the Board of Governors of the Federal Reserve System, as in effect from time to time. "Revolving Commitment" means $17,000,000.00. "Revolving Credit Period" means the period from and including the Effective Date to but not including January 31, 2003. "Revolving Loan" means a loan made pursuant to Section 2.01(b). "Revolving Note" means a promissory note of the Borrower substantially in the form of Exhibit B-1 hereto, evidencing the obligation of the Borrower to repay the Revolving Loans. "Security Agreement" means the Security Agreement between the Borrower and the Bank, dated as of the date hereof, as it may be amended, modified or supplemented from time to time. "Services Agreement" means the description of the Sweep Plus Service provided by the Bank to the Borrower, the terms of which are hereby incorporated in this Agreement by reference. "Subsidiary" means any corporation or other entity of which securities or other ownership interests having ordinary voting power to elect a majority of the board of directors or 39 other persons performing similar functions are at the time directly or indirectly owned by Trex Company, Inc. "Term Loan A " means the $58,000,000 loan made by Bank to Borrower as of the Effective Date. "Term Loan A Period" means the period from and including the Closing Date to but not including January 31, 2003. "Term Loan A Note" means the promissory note of the Borrower evidencing the obligation of the Borrower to repay Term Loan A. "Termination Date" means January 31, 2003, as said date may be extended pursuant to Section 2.07(b). "Total Consolidated Capitalization" means, as of any date of determination with respect to the Borrower, the sum of Total Consolidated Debt and Consolidated Net Worth. "Total Consolidated Debt" means, as of the date of determination, the total of all Debt of the Borrower and its Subsidiaries outstanding on such date, after eliminating all offsetting debits and credits between the Borrower and its Subsidiaries and all other items required to be eliminated in the course of the preparation of consolidated financial statements of the Borrower and its Subsidiaries in accordance with GAAP. "UCC" means the Uniform Commercial Code as in effect on the date hereof in the Commonwealth of Virginia, provided that if by reason of mandatory provisions of law, for matters pertaining only to the perfection or the effect of perfection or nonperfection of the Security Interest in any Collateral (as that term is defined in the Security Agreement) is governed by the Uniform Commercial Code as in effect in a jurisdiction other than Virginia, "UCC" means the Uniform Commercial Code as in effect in such other jurisdiction for purposes of the provisions hereof relating to such perfection or effect of perfection or nonperfection. "Unfunded Liabilities" means, with respect to any Plan at any time, the amount (if any) by which (a) the value of all benefit liabilities under such Plan, determined on a plan termination basis using the assumptions prescribed by the PBGC for purposes of Section 4044 of ERISA, exceeds (b) the fair market value of all Plan assets allocable to such liabilities under Title IV of ERISA (excluding any accrued but unpaid contributions), all determined as of the then most recent valuation date for such Plan but only to the extent that such excess represents a potential liability of a member of the ERISA Group to the PBGC or any other Person under Title IV of ERISA. "United States" means the United States of America, including the states and the District of Columbia, but excluding its territories and possessions. "Variance" means a rate per annum (which may be a negative number) above or below the Base Rate which the Bank, in its sole discretion, determines is appropriate to adjust the Base Rate in order that the interest rate on the Loans converted to Base Rate Loans in accordance with 40 Section 8.02 of this Agreement will be comparable to the applicable LIBOR or LIBOR Market Index-Based Rate plus the basis points over those rates set forth in Section 2.06. "Warrant" means the common stock purchase warrant referred to in Section 6.21, dated as of November 13, 2001, and any common stock purchase warrant subsequently issued in exchange, replacement or substitution therefor or any subsequently issued warrant. 41 USAGE The following rules of construction and usage shall be applicable to any instrument that is governed by this Appendix: (a) All terms defined in this Appendix shall have the defined meanings when used in any instrument governed hereby and in any certificate or other document made or delivered pursuant thereto unless otherwise defined therein. (b) The words "hereof," "herein," "hereunder" and words of similar import when used in an instrument refer to such instrument as a whole and not to any particular provision or subdivision thereof; references in any instrument to "Article," "Section" or another subdivision or to an attachment are, unless the context otherwise requires, to an article, section or subdivision of or an attachment to such instrument; and the term "including" means "including, without limitation." (c) The definitions contained in this Appendix are equally applicable to both the singular and plural forms of such terms and to the masculine as well as to the feminine and neuter genders of such terms. (d) Any agreement, instrument or statute defined or referred to below or in any agreement or instrument that is governed by this Appendix means such agreement or instrument or statute as from time to time amended, modified or supplemented, including (in the case of agreements or instruments) by waiver or consent and (in the case of statutes) by succession of comparable successor statutes and includes (in the case of agreements or instruments) references to all attachments thereto and instruments incorporated therein. References to a Person are also to its permitted successors and assigns. 42