Exhibit (b)(iii) SECOND AMENDMENT TO REVOLVING CREDIT, TERM LOAN, EQUIPMENT ACQUISITION TERM LOAN AND SECURITY AGREEMENT THIS SECOND AMENDMENT TO REVOLVING CREDIT, TERM LOAN, EQUIPMENT ACQUISITION TERM LOAN AND SECURITY AGREEMENT (the "Amendment") is entered into as of March __, 2004 to be effective as of the Effective Date (as defined herein) by and between CAPITALSOURCE FINANCE LLC, a Delaware limited liability company ("Agent"), the Lenders party thereto and each of ADVANCED NUTRACEUTICALS, INC., a Texas corporation ("Parent"), BACTOLAC PHARMACEUTICAL INC., a Delaware corporation ("Bactolac"), and ANI PHARMACEUTICALS, INC., a Mississippi corporation ("ANIP") and together with Parent and Bactolac, each a "Borrower" and collectively, the "Borrowers"). Capitalized terms used and not defined herein shall have the meanings assigned to such terms in the Agreement. A. WHEREAS, Agent, Lenders and Borrowers are parties to that certain Revolving Credit, Term Loan, Equipment Acquisition Term Loan and Security Agreement dated as of March 21, 2003 as amended by a First Amendment thereto dated December __, 2003 (as heretofore and hereafter amended, supplemented, modified and/or restated from time to time, the "Agreement"), pursuant to which the Lenders made Advances and Loans to the Borrowers; B. WHEREAS, Borrowers have requested that Agent and Lenders consent to the sale of substantially all of the assets of ANIP (the "Assets") and certain equipment and real property owned by Bactolac (the "Bactolac Asset") as such terms are defined in the Asset Purchase Agreement dated March __, 2003 (the "Asset Purchase Agreement") by and among the Borrowers and ANIP Acquisition Company, a Delaware corporation (the "Buyer"), and the documents, agreements and instruments to be executed or delivered in connection therewith (the "Purchase Documents"); C. WHEREAS, Borrowers have agreed with Agent and Lenders that, in connection with the sale of the Assets and Bactolac Assets, certain terms of the Agreement shall be amended as provided herein; NOW, THEREFORE, in consideration of the terms and conditions, premises and the other mutual covenants contained herein, and other good and valuable consideration, the receipt and sufficiency are hereby acknowledged, the parties hereto agree as follows: SECTION 1. Consent to Disposition of Certain Assets. The Agent (a) consents to Borrowers' execution and delivery and performance under the Purchase Documents attached hereto as Exhibit A hereto; and (b) agrees to release all Liens held by or in favor of Agent in the Assets and Bactolac Assets subject to the Paydown Letter in substantially the form attached as Exhibit B hereto. Borrowers shall not enter into or agree to enter into any amendment, modification or waiver of any of the Purchase Documents without the prior written consent of Agent. Borrower shall cause a portion of the purchase price for the Assets and Bactolac Assets in the amount of not less than $_____________ (the "Purchase Price") to be Federal funds wired transferred in immediately available funds to the Concentration Account for application to the Term Loan to reduce the Term Loan to $650,000 and the balance to the Revolving Loans. SECTION 2. Amendments. Upon the Effective Date, the Agreement shall be amended as follows: (a) Amendment to Facility Cap. The first "WHEREAS" in the recitals to the Agreement is amended to delete "Four Million Dollars ($4,000,000)" and to substitute "Two Million Five Hundred Thousand Dollars ($2,500,000)" in place thereof, thereby reducing the Facility Cap to $2,500,000. All Revolving Loans in excess of the reduced Facility Cap shall be repaid by application of a portion of the Purchase Price received by Agent. (b) Amendment to Term Loan. (i) The first "WHEREAS" in the recitals to the Agreement is amended to delete "One Million Dollars ($1,000,000)" and to substitute "Six Hundred Fifty Thousand Dollars ($650,000)" in place thereof thereby reducing the principal amount of the Term Loan to $650,000. This reduction in the principal amount of the Term Loan has been made by application of a portion of the proceeds of the Purchase Price received by Agent. (ii) Section 2.6 of the Agreement is amended to delete "One Million Dollars ($1,000,000)" and to substitute Six Hundred Fifty Thousand ($650,000)" in place thereof, thereby reducing the principal amount of the Term Loan to $650,000. This reduction in the principal amount of the Term Loan has been made by application of a portion of the proceeds of the Purchase Price received by Agent. (iii) Section 2.8 of the Agreement is amended to delete "Sixteen Thousand Six Hundred Sixty Six Dollars and Sixty Six Cents ($16,666.66)" and to substitute "Twenty Thousand ($20,000)" in place thereof. (iv) Borrowers agree that any funds released to Borrowers from the escrow established under the Asset Purchase Agreement will be paid to Agent and applied as a prepayment of the payments under the Term Loan, in the inverse order of their maturities. (c) Amendment to Inventory Cap. Section 2.1(b) of the Agreement is amended to delete "$750,000" and to substitute "$500,000" in place thereof. (d) Eligible Equipment, Eligible Inventory and Eligible Receivables. All references to Borrower in the definitions of Eligible Equipment, Eligible Inventory and Eligible Receivables shall exclude ANIP. None of the Equipment, Inventory or Accounts of ANIP shall be eligible for borrowing purposes under the Agreement. (e) Amendments to Annex 1 (i) Section 1 to Annex I is deleted and the following is substituted in place thereof: "(i) Tangible Net Worth As measured on the last day of each fiscal year of Borrowers, the Tangible Net Worth shall not be less than the following: - ---------------------------------------------------------------- Test Date Minimum Tangible Net Worth - ---------------------------------------------------------------- September 30, 2004 $8,500,000 - ---------------------------------------------------------------- September 30, 2005 $9,000,000" - ---------------------------------------------------------------- (ii) Section 2 of Annex I is deleted and the following is substituted in place thereof:" "2) Fixed Charge Coverage Ratio The Fixed Charge Coverage Ratio shall be not less than (a) 1.00 to 1.00 as of March 31, 2004 and April 30, 2004 and (b) 1.10 to 1.00 as of the last day of each calendar month commencing with the month ending May 31, 2004." (ii) Section 3 of Annex I is deleted and the following is substituted in place thereof: "3) Capital Expenditures Borrowers shall not permit the Capital Expenditures in the aggregate to exceed $400,000 in any fiscal year of the Borrowers." SECTION 3. Effective Date. Upon receipt by Agent of each of the following, this Amendment shall be deemed to be effective (the "Effective Date"): (a) This Amendment duly executed by each Borrower; (b) The $2,500,000 Revolving Note in substantially the form of Exhibit C attached to this Amendment duly executed by each Borrower; (c) The $650,000 Term Note in substantially the form of Exhibit D attached to this Amendment duly executed by each Borrower; (d) The Paydown Letter in substantially the form of Exhibit B attached to this Amendment duly executed by Borrowers and Buyer; and (e) the Purchase Price by Federal funds wire transfer of immediately available funds in the Concentration Account. SECTION 4. Consent to Change of Name. Immediately following the closing under the Purchase Documents, ANIP will change its name to NIB, Inc. pursuant to an amendment to its certificate of incorporation in form and substance satisfactory to Agent, and, subject to such review, Agent consents to this name change. SECTION 5. Agreement in Full Force and Effect as Amended. Except as specifically amended hereby, the Agreement and other Loan Documents shall remain in full force and effect and hereby are ratified and confirmed as so amended. This Amendment shall not constitute a novation, satisfaction and accord, cure, release and/or satisfaction of the Agreement and/or other Loan Documents, but shall constitute an amendment thereof. The parties hereto agree to be bound by the terms and conditions of the Agreement and Loan Documents as amended by this Amendment, as though such terms and conditions were set forth herein and therein in full. Each reference in the Agreement to "this Agreement," "hereunder," "hereof," "herein" or words of similar import shall mean and be a reference to the Agreement as amended by this Amendment, and each reference herein or in any other Loan Document or any other document or instrument to the Agreement shall mean and be a reference to the Agreement as amended and modified by this Amendment. Each reference in the Agreement and/or other Loan Documents or any other document or instrument to any Loan Documents or words of similar import shall mean and be a reference to the Loan Documents as amended hereby SECTION 6. Representations. Each Borrower hereby represents and warrants to Agent and Lenders as follows as of the date hereof and as of the Effective Date: (i) it is duly incorporated, validly existing and in good standing under the laws of its jurisdiction of organization; (ii) the execution, delivery and performance by it of this Amendment to which it is a party are within its powers, have been duly authorized, and do not contravene (A) its articles of incorporation or other organizational documents, or (B) any applicable law; (iii) no consent, license, permit, approval or authorization of, or registration, filing or declaration with any Governmental Authority or other Person is required in connection with the execution, delivery, performance, validity or enforceability of this Amendment by or against it; (iv) this Amendment has been duly executed and delivered by it; (v) this Amendment constitutes its legal, valid and binding obligations enforceable against it in accordance with its terms, except as enforceability may be limited by applicable bankruptcy, insolvency, reorganization, moratorium or similar laws affecting the enforcement of creditors' rights generally or by general principles of equity; (vi) it is in compliance with all covenants and agreements in the Loan Documents and it is not in default under the Agreement or any other Loan Document and, except for the actions waived under Section 1 hereof, no Default or Event of Default exists, has occurred and is continuing or would result by the execution, delivery or performance of this Amendment, including, without limitation, any violation or breach of or Event of Default with respect to Annex I of the Agreement, and (vii) the representations and warranties contained in the Loan Documents are true and correct in all material respects as of the date hereof and as of the Effective Date as if made on the date hereof, except for such representations and warranties limited by their terms to a specific date. SECTION 7. Miscellaneous. (a) The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, be deemed to be an amendment or modification of, or operate as a waiver of, any provision of the Agreement or any other Loan Document or any right, power or remedy of Agent, nor constitute a waiver of any provision of the Agreement or any other Loan Document, or any other document, instrument and/or agreement executed or delivered in connection therewith or of any Default or Event of Default under any of the foregoing, in each case whether arising before or after the date hereof or as a result of performance hereunder or thereunder. This Amendment shall not preclude the future exercise of any right, remedy, power or privilege available to Agent whether under the Agreement, other Loan Documents, at law or otherwise. (b) This Amendment may be executed in any number of counterparts (including by facsimile), and by the different parties hereto or thereto on the same or separate counterparts, each of which shall be deemed to be an original instrument but all of which together shall constitute one and the same agreement. Each party agrees that it will be bound by its own facsimile signature and that it accepts the facsimile signature of each other party. The Borrowers shall provide original signed copies of all Loan Documents. The descriptive headings of the various sections of this Amendment are inserted for convenience of reference only and shall not be deemed to affect the meaning or construction of any of the provisions hereof or thereof. Whenever the context and construction so require, all words herein in the singular number herein shall be deemed to have been used in the plural, and vice versa, and the masculine gender shall include the feminine and neuter and the neuter shall include the masculine and feminine. (c) This Amendment may not be changed, amended, restated, waived, supplemented, discharged, canceled, terminated or otherwise modified orally or by any course of dealing or in any manner other than as provided in the Agreement or the applicable Loan Document. This Amendment shall be considered part of the Agreement and shall be a Loan Document for all purposes under the Agreement and other Loan Documents. (d) This Amendment, the Agreement, and the Loan Documents constitute the final, entire agreement and understanding between the parties with respect to the subject matter hereof and thereof and may not be contradicted by evidence of prior, contemporaneous or subsequent oral agreements between the parties, and shall be binding upon and inure to the benefit of the successors and assigns of the parties hereto and thereto. There are no unwritten oral agreements between the parties with respect to the subject matter hereof and thereof. If any provision of this Amendment is adjudicated to be invalid under applicable laws or regulations, such provision shall be inapplicable to the extent of such invalidity without affecting the validity or enforceability of the remainder of this Amendment which shall be given effect so far as possible. (e) THIS AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE PARTIES HEREUNDER AND THEREUNDER SHALL BE GOVERNED BY AND CONSTRUED AND INTERPRETED IN ACCORDANCE WITH THE CHOICE OF LAW PROVISIONS SET FORTH IN THE AGREEMENT AND SHALL BE SUBJECT TO THE WAIVER OF JURY TRIAL AND NOTICE PROVISIONS OF THE AGREEMENT. (f) No Borrower may assign, delegate or transfer this Amendment or any of its rights or obligations hereunder or thereunder and any delegation, transfer or assignment in violation hereof shall be null and void. No rights are intended to be created under this Amendment for the benefit of any third party donee, creditor or incidental beneficiary of any Borrower or any other Person other than Agent and each Lender. Nothing contained in this Amendment shall be construed as a delegation to Agent of Borrowers' duties of performance, including, without limitation, any duties under any account or contract in which Agent has a security interest or Lien. This Amendment shall be binding upon Borrowers and Agent and Lenders and their respective successors and permitted assigns. Agent's and Lenders' ability to assign, sell or transfer all of any part of this Amendment and shall be governed by the Agreement. (g) Each Borrower hereby (i) consents to the execution and delivery of this Amendment by the other Borrowers, (ii) agrees that this Amendment shall not limit or diminish the obligations of the subject Borrower under the Loan Documents, (iii) reaffirms its obligations under each of the Loan Documents to which it is a party, and (iv) agrees that each of such Loan Documents remain in full force and effect and are hereby ratified and confirmed. All representations and warranties made in this Amendment and shall survive the execution and delivery of this Amendment and no investigation by Agent shall affect such representations or warranties or the right of Agent to rely upon them. (h) Each Borrower shall execute and deliver such other documents, certificates and/or instruments and take such other actions as Agent may reasonably request in order more effectively to consummate the transactions contemplated hereby. [SIGNATURES APPEAR ON FOLLOWING PAGE] SIGNATURE PAGE TO SECOND AMENDMENT TO REVOLVING CREDIT, TERM LOAN, EQUIPMENT ACQUISITION TERM LOAN AND SECURITY AGREEMENT IN WITNESS WHEREOF, the parties have caused this Second Amendment To Revolving Credit, Term Loan, Equipment Acquisition Term Loan And Security Agreement to be executed by their respective officers thereunto duly authorized, as of the date first written above to be effective on and as of the Effective Date. BORROWERS: ADVANCED NUTRACEUTICALS, INC., a Texas corporation By:_________________________________ Name: Title: BACTOLAC PHARMACEUTICAL, INC., a Delaware corporation By:_________________________________ Name: Title: ANI PHARMACEUTICALS, INC., a Mississippi corporation By:_________________________________ Name: Title: SIGNATURE PAGE TO SECOND AMENDMENT TO REVOLVING CREDIT, TERM LOAN, EQUIPMENT ACQUISITION TERM LOAN AND SECURITY AGREEMENT AGENT AND LENDER: CAPITALSOURCE FINANCE LLC By: ----------------------------------- Name: Joseph Turitz Title: Associate General Counsel