Document:

Exhibit 10.25c

                                                               [EXECUTION COPY]

                                AMENDMENT NO. 2
                                      TO
                               CREDIT AGREEMENT

     This AMENDMENT NO. 2, dated as of November 20, 2002 (this "Amendment"),
is made by and among AES EASTERN ENERGY, L.P., a Delaware limited partnership
(the "Borrower"), the bank listed on the signature pages of this Amendment as a
"Bank" (together with its successors and permitted assignees from time to time,
the "Bank") and UNION BANK OF CALIFORNIA, N.A., as Agent and Issuing Bank.

                            PRELIMINARY STATEMENT:

     The Borrower, the Bank, and Union Bank of California. N.A., as Agent and
Issuing Bank, previously entered into that certain Credit Agreement, dated as
of April 10, 2001, as amended by Amendment No. 1 and Waiver to Credit
Agreement, dated as of August 31, 2001 (as so amended, the "Existing
Agreement", as amended by this Amendment, the "Amended Agreement", and as the
Amended Agreement may hereafter be amended, supplemented or otherwise modified
from time to time, the "Credit Agreement"). The Borrower now wishes to amend
the Existing Agreement in certain particulars. The Bank, the Agent and the
Issuing Bank have agreed to such amendments on the terms and conditions set
forth herein. The parties therefore agree as follows (capitalized terms used
but not defined herein having the meanings assigned such terms in the Existing
Agreement):

     SECTION 1. Amendments to Existing Agreement. The Existing Agreement is,
effective as of the Effective Date (as hereinafter defined), hereby amended as
follows:

     (a) New Definitions. The following new definitions are hereby added to
Section 1.01 in the appropriate alphabetical order:

          "Accession and Amendment Agreement" means an Accession and Amendment
     Agreement entered into by a New Bank, the Agent and the Borrower, in
     substantially the form of Exhibit H.

          "Amendment No. 2" means Amendment No. 2, dated as of November
     20, 2002, among the Borrower, the Bank named therein

<PAGE>

                                                                              2

     and Union Bank of California, N.A., as Agent and Issuing Bank, which
     Amendment No. 2 amended this Agreement effective as of the date thereof.

          "Effective Date" has the meaning assigned to that term in Amendment
     No. 2.

          "New Bank" has the meaning assigned to that term in Section 2.01 (b).

     (b) Commitment. The definition of "Commitment" contained in Section 1.01
is hereby amended in its entirety to read as follows:

          "Commitment" means, for each Bank, the obligation of such Bank to
     make Loans to the Borrower and to participate in Extensions of Credit
     resulting from the issuance (or extension, modification or amendment) of
     any Letter of Credit in an aggregate amount no greater than (i) the amount
     set forth opposite such Bank's name under the heading "Commitment" on
     Annex A, (ii) in the case of any New Bank, the amount set forth opposite
     such New Bank's name on the signature pages to the Accession and Amendment
     Agreement to which it is a party or (iii) in the case of a Bank that
     becomes a Bank pursuant to an assignment entered into after the Effective
     Date, the amount of the assignor's Commitment assigned to such Bank, in
     each case as the same may be reduced from time to time pursuant to Section
     2.07 or increased or reduced from time to time pursuant to assignments in
     accordance with Section 11.09(a) or (b), as the context may require. The
     Commitments shall in no event exceed (A) on the Effective Date, $15
     million, and (B) at any time following the Effective Date, $35 million.

     (c) Domestic Lending Office. Clause (a) of the definition of "Domestic
Lending Office" contained in Section 1.01 is hereby amended in its entirety to
read as follows:

     "(a) the branch or office of such Bank set forth below such Bank's name
     under the heading "Domestic Lending Office" on Annex A or, in the case of
     a Bank that becomes a Bank pursuant to an assignment or an Accession and
     Amendment Agreement, the branch or office of such Bank set forth under the
     heading "Domestic Lending Office" in the Notice of Assignment given to the
     Borrower and the Agent with respect to such assignment or in such
     Accession and Amendment Agreement, as the case may be, or"

<PAGE>

                                                                              3

     (d) Eurodollar Lending Office. Clause (a) of the definition of
"Eurodollar Lending Office" contained in Section 1.01 is hereby amended in its
entirety to read as follows:

     "(a) the branch or office of such Bank set forth below such Bank's name
     under the heading "Eurodollar Lending Office" on Annex A or, in the case
     of a Bank that becomes a Bank pursuant to an assignment or an Accession
     and Amendment Agreement, the branch or office of such Bank set forth under
     the heading "Eurodollar Lending Office" in the Notice of Assignment given
     to the Borrower and the Agent with respect to such assignment or in such
     Accession and Amendment Agreement, as the case may be, or"

     (e) Letters of Credit. The definition of "Letter of Credit" contained in
Section 1.01 is hereby amended by deleting the phrase "to support the
obligations of the Borrower to purchasers of power from the Borrower's power
generating facilities" in its entirety and substituting therefor the new phrase
"to support the obligations of the Borrower to (a) purchasers of power from the
Borrower's or its Subsidiaries' power generating facilities and/or (b) third
parties in connection with obligations incurred by the Borrower or its
Subsidiaries in connection with the use and/or operation of the Borrower's or
its Subsidiaries' power generating facilities from time to time".

     (f) Maturity Date. The definition of "Maturity Date" contained in Section
1.01 is hereby amended by deleting the date "January 2, 2003" in its entirety
and substituting therefor the new date "January 2, 2004".

     (g) Post-Default Rate. The definition of "Post-Default Rate" contained in
Section 1.01 is hereby amended by deleting the figure "3.375%" in its entirety
and substituting therefor the new figure "3.625%".

     (h) Reportable Event. The definition of "Reportable Event" contained in
Section 1.01 is hereby amended in its entirety to read as follows:

          "Reportable Event" means any of the events set forth in Section
     4043(c) of ERISA, other than those events as to which notice is waived by
     the PBGC pursuant to the regulations issued under Section 4043 of ERISA.

     (i) Commitment to Lend. Section 2.01 is hereby amended in its entirety to
read as follows:

          Section 2.01. Commitment to Lend. (a) Upon the terms and subject to
     the conditions of this Agreement, each Bank agrees to make, from time to
     time during the period from the Agreement

<PAGE>

                                                                              4

     Date through the Maturity Date, one or more Loans to the Borrower in an
     aggregate unpaid principal amount not exceeding at any time such Bank's
     Available Commitment at such time. Subject to Section 2.06 and the other
     terms and conditions of this Agreement, the Loans may, at the option of
     the Borrower, be made as, and from time to time continued as or converted
     into, Base Rate Loans or Eurodollar Rate Loans, or any combination
     thereof. Upon the terms and subject to the conditions of this Agreement,
     the Borrower may borrow, pay or prepay and reborrow Loans.

          (b) In the event that the Commitments shall be increased at any time
     following the effective date of Amendment No. 2 through a post-closing
     syndication to additional financial institutions, each of which must
     satisfy the requirements of an Eligible Assignee ("New Banks"), each New
     Bank shall automatically become a Bank hereunder by executing and
     delivering to the Agent an Accession and Amendment Agreement; provided,
     that such New Bank is consented to by the Agent, each Issuing Bank and the
     Borrower. The Agent shall promptly notify each Bank of any New Bank, such
     New Bank's Commitment and the Percentage of each Bank after taking into
     account such New Bank's Commitment. On the effective date of each
     Accession and Amendment Agreement, each New Bank shall purchase by
     assignment from the other Banks (and such other Banks shall assign to such
     New Bank) such portion of the Loans and Unreimbursed Drawings (if any)
     owing to them as shall be designated by the Agent such that, after giving
     effect to all such purchases and assignments, the outstanding Loans and
     Unreimbursed Drawings owing to each Bank shall equal such Bank's
     Percentage of the aggregate amount of Loans and Unreimbursed Drawings
     owing to all Banks."

     (j) Interest on Loans. Section 2.03(a)(i) is hereby amended by (i)
deleting the figure "1.375%" in its entirety in each place in which it appears
and substituting therefor in each instance the new figure "1.50%" and (ii)
deleting the figure "2.375%" in its entirety and substituting therefor the new
figure "2.50%".

     (k) Commitment Fees. Section 2.08(a) is hereby amended by deleting the
figure "0.50%" in its entirety and substituting therefor the new figure
"0.75%".

     (1) Letter of Credit Fees. Section 2.08(b) is hereby amended by (i)
deleting the figure "2.375%" in its entirety and substituting therefor the new
figure "2.625%" and (ii) deleting the figure "4.375%" in its entirety and
substituting therefor the new figure "4.625%".

<PAGE>

                                                                              5

     (m) Interest on Issuing Bank Fees. Section 3.03 is hereby amended by
deleting the figure "1.375%" in its entirety and substituting therefor the new
figure "1.625%".

     (n) Interest on Drawings. Section 3.04(a) is hereby amended by (i)
deleting the phrase "a sum equal to the amount so paid plus interest on such
amount" in its entirety and substituting therefor the new phrase "a sum equal
to the amount so paid (but only to the extent that the Issuing Bank has not
received payment therefor from the Banks pursuant to subsection (b) below) plus
interest on such amount" and (ii) deleting the figure "1 375%" in its entirety
in each place in which it appears and substituting therefor in each instance
the new figure "1.625%".

     (o) Interest on Unreimbursed Drawings. Section 3.04(d) is hereby amended
by (i) deleting the figure "1.375%" in its entirety and substituting therefor
the new figure "1.625%", (ii) deleting the figure "2.375%" in its entirety and
substituting therefor the new figure "2.625%", and (iii) adding the following
proviso immediately preceding the period at the end of the first sentence
thereof:

     "; provided. however, that each Unreimbursed Drawing owing to an Issuing
     Bank (as a result of the failure by one or more Banks to make payment to
     such Issuing Bank pursuant to subsection (b) above) shall bear interest
     pursuant to subsection (a) above" hereby

     (p) ERISA Plan Obligations. The third sentence of Section 5.13(a) is
hereby amended in its entirety to read as follows:

     "Neither the Borrower nor any ERISA Affiliate has (i) sought a waiver of
     the minimum funding standard under Section 412 of the Code in respect of
     any Plan, (ii) failed to make any contribution or payment to any Plan, or
     made any amendment to any Plan, 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 Code or (iii) incurred any liability in excess of $100,000
     under Title IV of ERISA other than a liability to the PBGC for premiums
     under Section 4007 of ERISA."

     (q) Material Adverse Change. Section 5.23 is hereby amended by deleting
the date "December 31, 1999" in its entirety and substituting therefor the new
date "December 31, 2001".

     (r) Compliance with ERISA. Section 6.18 is hereby amended by (i) deleting
the phrase "permit to exist any "accumulated funding deficiency" (as defined in
Section 412(a) of the Code)" in its entirety and substituting therefor the new
phrase "permit to exist any "accumulated funding deficiency" (as defined in
Section 412(a) of the Code) with respect to any Plan" and (ii) deleting the
phrase

<PAGE>

                                                                              6

"permit to exist any occurrence of any Reportable Event (as defined in Title IV
of ERISA), or any other event or condition" in its entirety and substituting
therefor the new phrase "permit to exist any occurrence of any Reportable
Event, or any other event or condition with respect to any Plan".

     (s) ERISA Report. Section 7.0l(f) is hereby amended by deleting the
phrase "or any successor commission; and (iii) promptly upon receipt thereof"
in its entirety and substituting therefor the new phrase "or any successor
commission; (iii) promptly after its completion, the annual actuarial valuation
for each Plan of AES NY, the Borrower and each Subsidiary of the Borrower; and
(iv) promptly upon receipt thereof".

     (t) Events of Default. Section 8.0l(c)(iii) is hereby amended by deleting
the phrase "or any other "Event of Default" (as defined in the Guaranty) shall
occur" in its entirety and substituting therefor the new phrase "it being
understood that an "Event of Default" (as defined in the Guaranty) under
Section 9(b) or (c) of the Guaranty shall not constitute an Event of Default
hereunder".

     (u) ERISA Default. Section 8.01(i) is hereby amended by deleting the
phrase "and in each case in clauses (i) through (vi) above" in its entirety and
substituting therefor the new phrase "provided that, in each case in clauses
(i) through (vi) above".

     (v) Regulatory Changes. Section 9.02 is hereby amended by deleting the
figure "1.375%" in its entirety and substituting therefor the new figure
"1.625%".

     (w) Capital Requirements. Section 9.03 is hereby amended by deleting the
figure "1.375%" in its entirety and substituting therefor the new figure
"1.625%".

     (x) Funding Losses. Section 9.04 is hereby amended by deleting the figure
"1.375%" in its entirety and substituting therefor the new figure "1.625%".

     (y) Notices. (i) Section 1l.0l(a)(ii)(A) is hereby amended in its
entirety to read as follows:

     (A)  if to the Borrower, to it at:

     AES Eastern Energy, L.P.
     7725 Lake Road
     Barker, New York 14012
     Telecopier No.:  (716) 795-3654
     Telephone No.:   (716) 795-9501
     Attention:       Amy Conley, Chief Financial Officer

<PAGE>

                                                                              7

     (ii) Section 1l.0l(a)(ii)(C) is hereby amended by deleting the phrase "in
the case of a Bank that becomes a Bank pursuant to an assignment, set forth
under the heading "Notice Address" in the Notice of Assignment given to the
Borrower and the Agent with respect to such assignment" in its entirety and
substituting therefor the new phrase "in the case of a Bank that becomes a Bank
pursuant to an assignment or an Accession and Amendment Agreement, set forth
under the heading "Notice Address" in the Notice of Assignment given to the
Borrower and the Agent with respect to such assignment or in such Accession and
Amendment Agreement, as the case may be".

     (z) Assignments. Section 11.09(a)(ii) is hereby amended by (i) deleting
the phrase ", without the consent of the Borrower" in its entirety and (ii)
deleting the phrase "(C) the assignment is to a Bank or an Eligible Assignee or
an Affiliate of a Bank or an Eligible Assignee or is consented to by the
Borrower (unless an Event of Default exists), which consent shall not be
unreasonably withheld or delayed" in its entirety and substituting therefor the
new phrase "(C) the assignment is (1) to a Bank or an Eligible Assignee or an
Affiliate of a Bank or an Eligible Assignee and (2) consented to by the
Borrower, which consent shall not be unreasonably withheld or delayed
(provided, that such consent by the Borrower shall not be required (x) for any
assignment to a Bank or an Affiliate of a Bank or (y) during the existence of
an Event of Default)".

          (aa) New Exhibit. Exhibit H attached to this Amendment is hereby
     made, and shall be deemed to constitute, Exhibit H to the Credit
     Agreement.

          (bb) Revised Annex A. Annex A to the Credit Agreement is hereby
     deleted in its entirety and Annex A attached to this Amendment is
     substituted therefor.

          SECTION 2. Conditions of Effectiveness. This Amendment shall become
     effective as of the first date, on or after the date hereof and prior to
     January 2, 2003, on which each of the following conditions has been
     fulfilled (such first date being referred to herein as the "Effective
     Date"):

          (a) The Agent shall have received (i) counterparts of this Amendment
     duly executed by the Borrower, the Bank, the Agent and the Issuing Bank,
     and (ii) the following, each dated the Effective Date (except as otherwise
     specified below), in form and substance satisfactory to the Agent and each
     Bank (except where otherwise specified below) and (except for the Notes)
     in sufficient quantity for each party to have a fully executed original:

               (A) the consent of AES, substantially in the form of Exhibit A
          hereto, duly executed by an authorized officer of AES;

<PAGE>

                                                                              8

               (B) certified copies of the resolutions of the Board of
          Directors (or comparable governing body) of AES NY authorizing the
          Borrower to enter into this Amendment, and of all documents
          evidencing other necessary action (partnership. limited liability
          company or otherwise) and Governmental Approvals, if any, with
          respect to this Amendment;

               (C) a certificate of AES NY certifying the names, true
          signatures and incumbency of the officers of AES NY authorized to
          sign this Amendment and the other documents to be delivered
          hereunder;

               (D) copies of the certificate of limited partnership,
          partnership agreement, certificate of formation and limited liability
          company agreement, as applicable, of the Borrower and AES NY,
          together with all amendments thereto, in each case certified in a
          manner satisfactory to the Agent;

               (E) good standing certificates in respect of the Borrower and
          AES NY from its jurisdiction of organization and each jurisdiction in
          which it is qualified to do business as partnership or limited
          liability company, as the case may be, in each case dated no earlier
          than 10 days prior to the Effective Date;

               (F) a new Note payable to the order of the
          Bank, duly executed by the Borrower;

               (G) favorable opinions of:

                    (1) Chadbourne & Parke LLP, special New York counsel to the
               Borrower and AES NY, in substantially the form of Exhibit B
               hereto; and

                    (2) an in-house counsel of AES, acting as counsel to the
               Borrower and AES NY, in substantially the form of Exhibit C
               hereto; and

               (H) such other approvals, certificates, opinions and documents
          as the Agent may reasonably request.

          (b) The following statements shall be true and the Agent shall have
     received a certificate of the Borrower, dated the Effective Date and in
     sufficient copies for each Bank, stating that:

               (i) each Loan Document Representation and Warranty is true and
          correct on and as of such date, before and after giving effect to
          this Amendment, as though made on and as of such date (with each
          reference in the Loan Documents to the Existing Agreement being
          deemed to be a reference to this Amendment and the Amended
          Agreement), and

<PAGE>

                                                                              9

               (ii) no Default has occurred and is continuing, both before and
          after giving effect to the transactions contemplated by this
          Amendment.

          (c) The following statement shall be true and the Agent shall have
     received a certificate of AES, dated the Effective Date and in sufficient
     copies for each Bank, stating that: the representations and warranties set
     forth in Section 5 of the Guaranty are true and correct on and as of the
     Effective Date with the same effect as though made on and as of such date.

          (d) All fees payable on or prior to the Effective Date pursuant to
     the letter agreement, dated October 23, 2002, between the Agent and the
     Borrower, and all amounts payable pursuant to Section 11.02 of the
     Existing Agreement for which invoices have been delivered to the Borrower
     on or prior to the Effective Date, shall have been paid in full or
     arrangements satisfactory to the Agent shall have been made to cause them
     to be paid in full on such date.

          (e) All Governmental Approvals necessary in connection with this
     Amendment and the transactions contemplated hereby shall have been
     obtained and be in full force and effect. All third party approvals
     necessary or, in the judgment of the Agent, advisable in connection with
     this Amendment and the transactions contemplated hereby shall have been
     obtained and be in full force and effect. All such Governmental Approvals
     and third party approvals, if any, shall be in form and substance
     satisfactory to the Agent.

          (f) The Borrower shall have received for cancellation the Notes
     issued to any financial institution originally a party to the Credit
     Agreement that is no longer a Bank.

          (g) The sum of (i) the aggregate principal amount of all Loans and
     Unreimbursed Drawings outstanding on the Effective Date plus (ii) the
     aggregate LC Outstandings of all Letters of Credit outstanding on the
     Effective Date, in each case after giving effect to all Extensions of
     Credit and prepayments made on such date and the application of the
     proceeds thereof, shall not exceed $15,000,000.

          SECTION 3. Reference to and Effect on the Existing Agreement. (a)
     Upon the occurrence of the Effective Date: (i) each reference in the
     Existing Agreement to "this Agreement", "hereunder", "hereof" or words of
     like import referring to the Existing Agreement shall mean and be a
     reference to the Amended Agreement; and (ii) each reference in any other
     Loan Document to "the Credit Agreement", "thereunder", "thereof" or words
     of like import referring to the Existing Agreement shall mean and be a
     reference to the Amended Agreement. The parties hereto agree and
     acknowledge that this Amendment constitutes a Loan Document.

          (b) Except as specifically amended above, the Existing Agreement
     shall continue to be in full force and effect and is hereby in all
     respects ratified

<PAGE>

                                                                             10

     and confirmed. Without limiting the generality of the foregoing, the
     Pledge Agreement and all of the Collateral described therein do and shall
     continue to secure the payment of all Secured Obligations (as defined in
     the Pledge Agreement).

          (c) The execution, delivery and effectiveness of this Amendment shall
     not, except as expressly provided herein, operate as a waiver of any
     right, power or remedy of the Banks, the Issuing Banks or the Agent under
     the Existing Agreement or any other Loan Document, nor constitute a waiver
     of any provision of the Existing Agreement or any other Loan Document.

          SECTION 4. Costs and Expenses. The Borrower agrees to pay on demand
     all reasonable costs and expenses of the Agent in connection with the
     preparation, negotiation, execution and delivery of this Amendment and the
     other instruments and documents to be delivered hereunder, including,
     without limitation, the reasonable fees and out-of-pocket expenses of
     counsel to the Agent with respect thereto and with respect to advising the
     Agent as to its rights and responsibilities hereunder and thereunder, and
     all costs and expenses of the Agent and each Bank (including, without
     limitation, reasonable fees and expenses of counsel to the Agent and
     counsel for each Bank) in connection with the enforcement (whether through
     negotiations, legal proceedings or otherwise) of this Amendment.

          SECTION 5. Execution in Counterparts. This Amendment may be executed
     in any number of counterparts and by different parties hereto in separate
     counterparts, each of which when so executed and delivered shall be deemed
     to be an original and all of which taken together shall constitute but one
     and the same instrument. In furtherance of the foregoing, it is understood
     and agreed that signatures hereto submitted by facsimile transmission
     shall be deemed to be, and shall constitute, original signatures.

          SECTION 6. Governing Law. This Amendment shall be governed by, and
     construed in accordance with, the laws of the State of the New York.

<PAGE>

                                                                            S-1

     IN WITNESS WHEREOF, the parties hereto have caused Amendment to be
executed by their respective officers thereunto duly authorized, as of the date
first above written.

                                   AES EASTERN ENERGY, L.P.

                                   By: AES NY, L.L.C., its general partner

                                   By /s/ Amy V. Conley
                                     -----------------------------
                                     Name:  Amy V. Conley
                                     Title: Vice President & Treasurer

                                   UNION BANK OF CALIFORNIA, N.A.,
                                   as Agent and Issuing Bank

                                   By
                                     -----------------------------
                                     Name:
                                     Title:

<PAGE>

                                                                            S-1

     IN WITNESS WHEREOF, the parties hereto have caused Amendment to be
executed by their respective officers thereunto duly authorized, as of the date
first above written.

                                   AES EASTERN ENERGY, L.P.

                                   By: AES NY, L.L.C., its general partner

                                   By
                                     -----------------------------
                                     Name:
                                     Title:

                                   UNION BANK OF CALIFORNIA, N.A.,
                                   as Agent and Issuing Bank

                                   By /s/ David M. Musicant
                                     -----------------------------
                                     Name:  David M. Musicant
                                     Title: Senior Vice President

<PAGE>

                                                                            S-2

                                   Bank
                                   ----

                                   UNION BANK OF CALIFORNIA, N.A.

                                   By /s/ David M. Musicant
                                     -----------------------------
                                     Name:  David M. Musicant
                                     Title: Senior Vice President

<PAGE>

                                                                      EXHIBIT A

                                    CONSENT

     The undersigned, as Guarantor under that certain Limited Guaranty, dated
as of April 10, 2001 (the "Guaranty"), in favor of the Banks, the Issuing
Banks and the Agent, (i) hereby consents to Amendment No. 2, dated as of
November 20, 2002, to the Credit Agreement. dated as of April 10, 2001, as
amended by that certain Amendment No. 1 and Waiver, dated as of August 31, 2001
(the "Credit Agreement", the terms defined therein being used herein as therein
defined), among AES Eastern Energy, L.P., the Banks and Issuing Banks party
thereto, and Union Bank of California. N.A., as Agent, and (ii) hereby confirms
and agrees that the Guaranty is, and shall continue to be, in full force and
effect and is hereby confirmed and ratified in all respects except that, on and
after the effective date of said Amendment No. 2, each reference in the
Guaranty to "the Credit Agreement", "thereunder", "thereof" or words of like
import referring to the Credit Agreement shall mean and be a reference to the
Credit Agreement, as amended by said Amendment No. 2.

November 20, 2002                       THE AES CORPORATION

                                        By
                                          ------------------------------
                                          Name:
                                          Title:

<PAGE>

                                                                      EXHIBIT H

                   FORM OF ACCESSION AND AMENDMENT AGREEMENT

                                                     Dated ___________ __, 20__

     Reference is made to the Credit Agreement, dated as of April 10, 2001, as
amended by Amendment No. 1 and Waiver to Credit Agreement, dated as of August
31, 2001, and Amendment No. 2 to Credit Agreement, dated as of November 20,
2002 (said Agreement, as so amended and as it may be further amended,
supplemented or otherwise modified from time to time, being the "Credit
Agreement", the terms defined therein and not otherwise defined herein being
used herein as therein defined), among AES Eastern Energy, L.P. (the
"Borrower"), the Banks named therein and Union Bank of California. N.A., as
Agent and Issuing Bank. Pursuant to Section 2.01(b) of the Credit Agreement,
_________________ (the "New Bank") has committed to make loans ("Loans") to the
Borrower in accordance with the terms and conditions of the Credit Agreement[,
which Loans are evidenced by a promissory note (the "Note") issued by the
Borrower to the New Bank and dated the date hereof,] and to participate in
Extensions of Credit resulting from the issuance (or extension, modification or
amendment) of any Letter of Credit.

     The New Bank and the Agent agree as follows:

     1. The New Bank agrees, on the terms and conditions set forth in the
Credit Agreement, to make Loans to the Borrower and to participate in the
issuance of Letters of Credit (and all Unreimbursed Drawings with respect
thereto) during the period from the date hereof until the Maturity Date, in an
aggregate outstanding amount not to exceed on any day the New Bank's Commitment
set forth opposite its signature below.

     2. On the date hereof (the "Commitment Effrctive Date"), the New Bank
shall pay to the Agent, in same day funds, at such address and account as the
Agent shall advise the New Bank, $_____________, which amount shall be used to
purchase by assignment from the existing Banks such portion of the Loans and
Unreimbursed Drawings owing to them such that, after giving effect to all such
purchases and assignments, the New Bank will share such Loans and Unreimbursed
Drawings ratably with each of them (based upon the New Bank's Percentage). From
and after the Commitment Effective Date, the New Bank shall be a party to the
Credit Agreement, entitled to all rights, powers and privileges, and subject to
all obligations, of a Bank thereunder, including without limitation (i) the
right to receive all payments made by the Borrower in respect of the Loans made
by the New Bank and all Unreimbursed Drawings, whether on account of

                                      H-1
<PAGE>

principal, interest, fees, indemnities in respect of claims arising after the
date hereof, increased costs, additional amounts or otherwise, (ii) the right
to vote and to instruct the Agent under the Credit Agreement according to its
Percentage, (iii) the right to set-off and to appropriate and apply deposits of
the Borrower as set forth in the Credit Agreement and (iv) the right to receive
notices, requests, demands and other communications.

     3. The New Bank (i) confirms that it has received a copy of each Loan
Document and such other documents, financial statements and information as it
has deemed appropriate to make its own credit analysis and decision to enter
into this Agreement and to become a Bank under the Credit Agreement, (ii)
agrees that it will, independently and without reliance upon the Agent or any
other Bank and based on such documents and information as it shall deem
appropriate at the time, continue to make its own credit decisions in taking or
not taking action under the Loan Documents, (iii) confirms that it satisfies
the requirements of an Eligible Assignee, (iv) appoints and authorizes the
Agent to take such action as agent on its behalf and to exercise such powers
under the Loan Documents as are delegated to the Agent by the terms thereof,
together with such powers as are reasonably incidental thereto, (v) agrees that
it will perform in accordance with their terms all of the obligations which by
the terms of the Loan Documents are required to be performed by it as a Bank
and (vi) represents and warrants to the Agent that it has duly executed and
delivered this Agreement and that the execution, delivery and performance by
the New Bank of this Agreement have been duly authorized by all necessary
action (corporate or otherwise).

     4. This Agreement may be executed in any number of counterparts and by
different parties in separate counterparts, each of which when so executed
shall be deemed to be an original and all of which taken together shall
constitute but one and the same instrument.

     5. This Agreement shall be governed by, and construed in accordance with,
the laws of the State of New York.

                                      H-2
<PAGE>

     IN WITNESS WHEREOF, the parties hereto have caused this Accession and
Amendment Agreement to be executed by their respective officers thereunto duly
authorized, as of the date first above written.

Commitment
----------

$____________________                        [NAME OF NEW BANK]

                                             By:
                                                -------------------------------
                                                Title:

                                             Notice Address:

                                             ----------------------------------
                                             ----------------------------------
                                             ----------------------------------

                                             Domestic Lending Office:

                                             ----------------------------------
                                             ----------------------------------
                                             ----------------------------------

                                             Eurodollar Lending Office:

                                             ----------------------------------
                                             ----------------------------------
                                             ----------------------------------

                                             UNION BANK OF CALIFORNIA, N.A.,
                                             as Agent

                                             By:
                                                -------------------------------
                                                Name:
                                                Title:

                                      H-3
<PAGE>

AGREED and ACCEPTED
as of the date first above
written:

AES EASTERN ENERGY, L.P.

By: AES NY, L.L.C., its general partner

By:
   -------------------------------
   Name:
   Title:

[ISSUING BANKS]

By:
   -------------------------------
   Name:
   Title:

                                      H-4
<PAGE>

<TABLE>
                                                                ANNEX A

                                           COMMITMENTS, LENDING OFFICES AND NOTICE ADDRESSES

    Name of Bank              Commitment          Notice Address         Domestic Lending Office     Eurodollar Lending Office
-------------------------------------------------------------------------------------------------------------------------------
<S>                         <C>              <C>                         <C>                         <C>
Union Bank of California,   $15,000,000.00   Union Bank of California,   Union Bank of California,   Union Bank of California,
  N.A.                                         N.A.                        N.A.                        N.A.
                                             445 South Figueroa Street   445 South Figueroa Street   445 South Figueroa Street
                                             15th Floor                  15th Floor                  15th Floor
                                             Los Angeles, CA 90071       Los Angeles, CA 90071       Los Angeles, CA 90071
                                             Attention: Chad Canfield    Attention: Chad Canfield    Attention: Chad Canfield
                                             Telephone: (213) 236-6175   Telephone: (213) 236-6175   Telephone: (213) 236-6175
                                             Telecopier: (213) 236-4096  Telecopier: (213) 236-4096  Telecopier: (213) 236-4096
</TABLE>Salary Continuation Agreement

EXHIBIT 10.4 
 
MID PENN BANK 
SALARY CONTINUATION AGREEMENT 
 
THIS AGREEMENT is made effective this 1st day of January 1999, by and Mid Penn Bank, a Pennsylvania corporation located in Millersburg, Pennsylvania (the “Company”) and Alan W. Dakey (the
“Executive”). 
 
INTRODUCTION

 
To encourage the Executive to remain an
employee of the Company, the Company is willing to provide salary continuation benefits to the Executive. The Company will pay the benefits from its general assets. 
 
AGREEMENT 
 
The Executive and the Company agree as follows: 
 
Article 1 
Definitions 
 
1.1  Definitions.    Whenever used in this Agreement, the following words and phrases shall have the meanings specified: 
 
1.1.1 “Change of Control” shall mean any of the following: 
 
(A)    any person (as
such term is used in Sections 13(d) and 14(d)(2) of the Securities Exchange Act of 1934, as amended (the “Exchange Act”), other than the Corporation, a subsidiary of the Corporation, an employee benefit plan (or related trust) of the
Corporation or a direct or indirect subsidiary of the Corporation, or affiliates of the Corporation (as defined in Rule 12b-2 under the Exchange Act), becomes the beneficial owner (as determined pursuant to Rule l3d-3 under the Exchange Act),
directly or indirectly, of securities of the Corporation representing more than 20% of the combined voting power of the Corporation’s then outstanding securities or announces a tender offer 
 

 
or exchange
offer for securities of the Corporation representing more than 20% of the combined voting power of the Corporation’s then outstanding securities; or 
 
(B)  the liquidation or dissolution of the Corporation or the Company or the occurrence of, or execution of an
agreement providing for, a sale of all or substantially all of the assets of the Corporation or the Company to an entity which is not a direct or indirect subsidiary of the Corporation; or 
 
(C) the occurrence of, or execution of an agreement providing for, a reorganization,
merger, consolidation or other similar transaction or connected series of transactions of the Corporation as a result of which either (a) the Corporation does not survive or (b) pursuant to which shares of the Corporation, common stock (“Common
Stock”) would be converted into cash, securities or other property, unless, in case of either (a) or (b), the holders of Corporation Common Stock immediately prior to such transaction will, following the consummation of the transaction,
beneficially own, directly or indirectly, more than: 50% of the combined voting power of the then outstanding voting securities entitled to vote generally in the election of directors of the corporation surviving, continuing or resulting from such
transaction; or 
 
(D)  the occurrence of, or execution of an agreement providing for, a reorganization, merger, consolidation., or similar transaction of the Corporation, or before any connected series of such transactions, if, upon
consummation of such transaction or transactions, the persons who are members of the Board of Directors of the Corporation immediately before such transaction or transactions cease or, in the case of the execution of an agreement for such
transaction or transactions, it is contemplated in such agreement that upon consummation such persons would cease, to constitute a majority of the Board of Directors of the Corporation or, in a case where the Corporation 
 

 
does not
survive in such transaction, of the corporation surviving, continuing or resulting from such transaction or transactions; or 
 
(E)  any other event which is at any time designated as a “Change of Control” for purposes of this
Agreement by a resolution adopted by the Board of Directors of the Corporation with the affirmative vote of a majority of the non-employee directors in office at the time the resolution is adopted; in the event any such resolution is adopted, the
Change of Control event specified thereby shall be deemed incorporated herein by reference and thereafter may not be amended, modified or revoked without the written agreement of Executive. 
 
Notwithstanding anything else to the contrary set forth in
this Agreement, if (i) an agreement is executed by the Corporation or the Company providing for any of the transactions or events constituting a Change of Control as defined herein, and the agreement subsequently expires or is terminated without the
transaction or event being consummated, and (ii) Executive’s employment did not terminate during the period after the agreement and prior to such expiration or termination, for purposes of this Agreement it shall be as though such agreement was
never executed and no Change of Control event shall be deemed to have occurred as a result of the execution of such agreement. 
 
1.1.2  ”Code” means the Internal Revenue Code of 1986, as amended. 
 
1.1.3  “Corporation” means Mid Penn Bancorp, Inc. 
 
1.1.4  “Disability” means the Executive suffering a sickness, accident or injury which, in the
judgment of a physician satisfactory to the Company, prevents the Executive from performing substantially all of the Executive’s normal duties for the Company. As a condition to any benefits, the Company may require the Executive to submit to
such physical or mental evaluations and tests as the Company’s Board of Directors deems appropriate. 
 

 
1.1.5  “Early Termination” means: the Termination of Employment before Normal Retirement Age for reasons other than death, Disability, Termination for Cause or following a Change of Control. 
 
1.1.6  “Early Termination
Date” means the month, day and year in which Early Termination occurs. 
 
1.1.7  “Normal Retirement Age” means the Executive’s 65th birthday. 
 
1.1.8  “Normal Retirement Date” means the later of the Normal Retirement Age or Termination of Employment. 
 
1.1.9  “Plan Year” means each twelve-month period commencing with the effective date of this
Agreement. 
 
1.1.10  “Termination for Cause” See Section 5.2. 
 
1.1.11  “Termination ofEmployment” means that the Executive ceases to be employed by the
Company for any reason whatsoever other than by reason of a leave of absence which is approved by the Company. For purposes of this Agreement, if there is a dispute over the employment status of the Executive or the date of the Executive’s
Termination of Employment, the Company shall have the sole and absolute right to decide the dispute. 
 
Article 2 
Lifetime Benefits 
 
2.1  Normal Retirement
Benefits.    Upon Termination of Employment on or after the Normal Retirement Age for reasons other than death, the Company shall pay to the Executive the benefit described in this Section 2.1. in lieu of any other benefit
under this Agreement. 
 
2.1.1  Amount of Benefit.    The annual Normal Retirement Benefit under this Section 2.1 is $84,000 (eighty-four thousand dollars). The Company may increase the annual benefit under this Section
2.1 at the sole and absolute discretion of the Company’s Board of Directors. Any increase in the annua1 benefit shall require the recalculation of all the 

 
amounts on
Schedule A attached hereto. The annual benefit amounts on Schedule A are calculated by amortizing the annual normal retirement benefit using the interest method of accounting, a 7.50% discount rate, monthly compounding and monthly payments.

 
2.1.2  Payment of
Benefit.    The Company shall pay the annual benefit to the Executive in 12 equal monthly installments payable on the first day of each month commencing with the month following the Executive’s Normal Retirement Date and
continuing for 179 additional months. 
 
2.1.3  Benefit Increases.    Commencing on the first anniversary of the first benefit payment, and continuing on each subsequent anniversary, the Company’s Board of Directors, in its sole
discretion, may increase the benefit. 
 
2.2  Early Termination Benefit.    Upon Early Termination, the Company shall pay to the Executive the benefit described in this Section 2.2 in lieu of any other benefit under this Agreement.

 
2.2.1  Amount of
Benefit.    The annual benefit under this Section 2.2 is the Early Termination Annual Benefit set forth in Schedule A for the Plan Year ending immediately prior to the Early Termination Date. 
 
2.2.2  Payment of
Benefit.    The Company shall pay the annual benefit to the Executive in 12 equal monthly installments payable on the first day of each month commencing with the month following the Executive’s Normal Retirement Age and
continuing for 179 additional months. 
 
2.2.3  Benefit Increases’.    Benefit payments may be increased as provided in Section 2.1.3. 

 
2.3  Disability Benefit.    If the Executive terminates employment due to Disability prior to Normal Retirement Age, the Company shall pay to the Executive the benefit described in this Section
2.3 in lieu of any other benefit under this Agreement. 
 
2.3.1  Amount of Benefit.    The annual benefit under this Section 2.3 is the Disability Benefit amount set forth in schedule A for the Plan Year ending immediately prior to the date in
which Termination of Employment occurs. 
 
2.3.2  Payment of Benefit.    The Company shall pay the benefit to the Executive in 12 equal monthly installments commencing within 90 days after the date of the Executive’s Termination of
Employment and continuing for 179 additional months. 
 
2.3.3  Benefit Increases.    Benefit payments may be increased as provided in Section 2.1.3. 
 
2.4  Change of Control Benefit.    If the Executive is in the active service of the Company at the
time of a Change of Control, the Company shall pay to the Executive the benefit described in this Section 2.4 in lieu of any other benefit under this Agreement. 
 
2.4.1  Amount of Benefit.    The annual benefit under
this Section 2.4 is the Normal Retirement Benefit described in Section. 2.1.1. 
 
2.4.2  Payment of Benefit.    The Company shall pay the annual benefit amount to the Executive in 12 equal monthly installments payable on the first day of each
month commencing with the month following Normal Retirement Age and continuing for 179 additional months. 
 
2.4.3  Benefit Increases.    Benefit payments may be increased as provided in Section
2.1.3 

 
Article 3

Death Benefits 
 
3.1  Death During Active Service.    If the Executive dies while in the active service of the
Company, the Company shall pay to the Executive’s beneficiary the benefit described in this Section 3.1. This benefit shall be paid in lieu of the Lifetime Benefits of Article 2. 
 
3.1.1  Amount of
Benefit.    The annual benefit under this Section 3.1 is the Normal Retirement Benefit described in. Section 2.1.1. 
 
3.1.2  Payment of Benefit.    The Company shall pay the annual benefit to the
beneficiary in 12 equal monthly installments payable on the first day of each month commencing with the month following the Executive’s death and continuing for 179 additional months. 
 
3.2  Death During Benefit Period.    If lie Executive dies after the
benefit payments have commenced under this Agreement but before receiving all such payments, the Company shall pay the remaining benefits to the Executive’s beneficiary at the same time and in the same amounts they would have been paid to the
Executive had the Executive survived. 
 
3.3  Death Following Termination of Employment But Before Benefits Commence.    If the Executive is entitled to benefits under this Agreement, but dies prior to receiving said benefits, the
Company shall pay to the Executive’s beneficiary the same benefits, in the same manner, they would have been paid to the Executive had the Executive survived; however, said benefit payments will commence upon the Executive’s death.

 
Article 4 
Beneficiaries 
 
4.1  Beneficiary Designations.    The Executive shall designate a beneficiary by filing a written
designation with the Company. The Executive may revoke or modify the designation at any time by filing a new designation. However, designations will only be effective if signed by 

 
the Executive and accepted by
the Company during the Executive’s lifetime. The Executive’s beneficiary designation shall be deemed automatically revoked if the beneficiary predeceases the Executive, or if the Executive names a spouse as beneficiary and the marriage is
subsequently dissolved. If the Executive dies without a valid beneficiary designation, all payments shall be made to the Executive’s estate. 
 
4.2  Facility of Payment.    If a benefit is payable to a minor, to a person declared incapacitated,
or to a person incapable of handling the disposition of his or her property, the Company may pay such benefit to the guardian, legal representative or person having the care or custody of such minor, incapacitated person or incapable person. The
Company may require proof of incapacity, minority or guardianship as it may deem appropriate prior to distribution of the benefit. Such distribution shall completely discharge the Company from all liability with respect to such benefit.

 
Article 5 
General Limitations 
 
Notwithstanding any provision of this Agreement to the contrary, the Company shall not pay any benefit under this Agreement: 
 
5.1  Excess Parachute
Payment.    To the extent the benefit would be an excess parachute payment under Section 280G of the Code. 
 
5.2  Termination for Cause.    If the Company terminates the Executive’s employment for:

 
5.2.1  Gross
negligence or gross neglect of duties; 
 
5.2.2  Commission of a felony or of a gross misdemeanor involving moral turpitude; or 

 
5.2.3  Fraud, disloyalty, dishonesty or willful violation of any Law or significant Company policy committed in connection with the Executive’s employment and resulting in an adverse effect on the Company.

 
5.3  Competition After Termination
of Employment. If the Executive, without the prior written consent of the Company, engages in, becomes interested in, directly or indirectly, as a sole proprietor, as a partner in a partnership, or as a substantial shareholder in a corporation,
or becomes associated with, in the capacity of employee, director, officer, principal, agent, trustee or in any other capacity whatsoever, any enterprise conducted in the trading area (a 50 mile radius) of the business of the Company, which
enterprise is, or may deemed to be, competitive with any business carried on by the Company as of the date of termination of the Executive’s employment or his retirement. This section shall not apply following a Change of Control. 
 
5.4  Suicide or Misstatement. If the
Executive commits suicide within two years after the date of this Agreement, or if the Executive has made any material misstatement of fact on any application for life insurance purchased by the Company. 
 
Article 6 
Claims and Review Procedures 
 
6.1  Claims Procedure. The Company shall notify any person or entity that makes a claim against the Agreement (the
“Claimant”) in writing, within ninety (90) days of Claimant’s written application for benefits, of his or her eligibility or noneligibility for benefits under the Agreement. If the Company determines that the Claimant is not eligible
for benefits or full benefits, the notice shall set forth (1) the specific reasons for such denial, (2) a specific reference to the provisions of the Agreement on which the denial is based, (3) a description of any additional information or material
necessary for the Claimant to perfect his or her claim, and a description of why it is needed, and (4) an explanation of the Agreement’s claims review procedure and other appropriate information as to the steps to be taken if the Claimant
wishes to 

 
have the claim reviewed. If
the Company determines that there are special circumstances requiring additional time to make a decision, the Company shall notify the Claimant of the special circumstances and the date by which a decision is expected to be made, and may extend the
rime for up to an additional ninety-day period. 
 
6.2  Review Procedure. If the Claimant is determined by the Company not to be eligible for benefits, or if the Claimant believes that he or she is entitled to greater or different benefits, the Claimant shall have
the opportunity to have such claim reviewed by the Company by filing a petition for review with the Company within sixty (60) days after receipt of the notice issued by the Company. Said petition shall state the specific reasons which the Claimant
believes entitle him or her to benefits or to greater or different benefits. Within sixty (60) days after receipt by the Company of the petition, the Company shall afford the Claimant (and counsel, if any) an opportunity to present his or her
position to the Company orally or in writing, and the Claimant (or counsel) shall have the right to review the pertinent documents. The Company shall notify the Claimant of its decision in writing within the sixty-day period, stating specifically
the basis of its decision, written in a manner calculated to be understood by the Claimant and the specific provisions of the Agreement on which the decision is based. If, because of the need for a hearing, the sixty-day period is not sufficient,
the decision may be deferred for up to another sixty-day period at the election of the Company, but notice of this deferral shall be given to the Claimant. 
 
Article 7 
Amendments and Termination 
 
This Agreement may be amended or terminated only by a written agreement signed by the Company and the Executive. 

 
Article 8

Miscellaneous 
 
8.1  Binding Effect.    This Agreement shall bind the Executive and the Company, and their
beneficiaries, survivors, executors, successors, administrators and transferees. 
 
8.2  No Guarantee of Employment.    This Agreement is not an employment policy or contract, It does not give the Executive the right to remain an employee of the
Company, nor does it interfere with the Company’s right to discharge the Executive. It also does not require the Executive to remain an employee nor interfere with the Executive’s right to terminate employment at any time. 
 
8.3  Non-Transferability.    Benefits under this Agreement cannot be sold, transferred, assigned, pledged, attached or encumbered in any manner. 
 
8.4  Tax
Withholding.    The Company shall withhold any taxes that are required to be withheld from the benefits provided under this Agreement. 
 
8.5  Applicable Law.    The Agreement and all rights hereunder shall be governed by the laws of the
Commonwealth of Pennsylvania, except to the extent preempted by the laws of the United States of America. 
 
8.6  Unfunded Arrangement.    The Executive and beneficiary are general unsecured creditors of the
Company for the payment of benefits under this Agreement. The benefits represent the mere promise by the Company to pay such benefits. The rights to benefits arc not subject in any manner to anticipation, alienation, sale, transfer, assignment,
pledge, encumbrance, attachment, or garnishment by creditors. Any insurance on the Executive’s life is a general asset of the Company to which f lie Executive and beneficiary have no preferred or secured claim. 

 
8.7  Recovery of Estate Taxes.    If the Executive’s gross estate for federal estate tax purposes includes any amount determined by reference to and on account of this Agreement, and if the
beneficiary is other than the Executive’s estate, then the Executive’s estate shall be entitled to recover from the beneficiary receiving such benefit under the terms of the Agreement, an amount by which the total estate tax due by the
Executive’s estate, exceeds the total estate tax which would have been payable if the value of such benefit had not been included in the Executive’s gross estate. If there is more than one person receiving such benefit, the right of
recovery shall be against each such person. In the event the beneficiary has a liability hereunder, the beneficiary may petition the Company for a lump sum payment in an amount not to exceed the beneficiary’s liability hereunder. 
 
8.8  Entire
Agreement.    This Agreement constitutes the entire agreement between the Company and the Executive as to the subject matter hereof. No rights are granted to the Executive by virtue of this Agreement other than those
specifically set forth herein. 
 
8.9  Administration.    The Company shall have powers which are necessary to administer this Agreement, including but not limited to: 
 
8.9.1  Interpreting the provisions of the Agreement; 
 
8.9.2  Establishing and revising
the method of accounting for the Agreement; 
 
8.9.3  Maintaining a record of benefit payments; and 
 
8.9.4  Establishing rules and prescribing any forms necessary or desirable to administer the Agreement. 

 
IN WITNESS
WHEREOF, the Executive and a duly authorized Company officer have signed this Agreement. 
 

	 EXECUTIVE:
	 	 COMPANY:
 MID PENN BANK

	 	 	 
	
	 	 By _____________________________________

	 Alan W. Dakey
	 	 Title ____________________________________

 
By
execution hereof, Mid Penn Bancorp, Inc. consents to and agrees to be bound by the terms and condition of this Agreement. 
 

	 ATTEST:
	 	 CORPORATION:
 MID PENN BANCORP, INC.

	 	 	 
	
	 	 By _____________________________________

	 	 	 Title ____________________________________

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00049-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00049-of-00352.parquet"}]]