**Exhibit 10.40**

**Amendment Number Two to Employment Agreement**

**Between Mirant Corporation and S. Linn Williams**

This Amendment is made as of July 17, 2007 between Mirant Corporation (the “Company”), Mirant Services, LLC(“Services”) and S. Linn Williams (“Executive”). 

Whereas, the Company, Services and Executive desire to amend theEmployment Agreement between the Company, Services and Executive dated as of November 3, 2005, as amended as of August 11, 2006 (the “Employment Agreement”) to comply with requirements of Section 409A of the Internal RevenueCode of 1986, as amended (the “Code”); 

In consideration of the mutual covenants contained herein and other good and valuableconsideration, the receipt and sufficiency of which are hereby acknowledged, the Company, Services and Executive agree to amend the Employment Agreement as follows: 

**1. Section 3(b) of the Employment Agreement is amended by adding the following sentence to the end of such section:**

The amount ofreasonable business expenses eligible for reimbursement in any taxable year of Executive shall not affect the amount of reasonable business expenses eligible for reimbursement in any other taxable year of Executive. 

**2. Sections 5(a) through 5(g) of the Employment Agreement are deleted and the provisions below are substituted for such sections of the Employment Agreement:**

5. Severance. 

(a) Termination Without Cause, Non-Renewal or for Good Reason. In the event of Executive’s termination of employment with the Company (1) by the Company without Cause (as defined herein), (2) by reason of thefailure of the Company to offer to renew the Agreement on terms and conditions at least equal to the terms and conditions set forth in the Employment Agreement executed on November 3, 2005, which shall be deemed to include a Base Salary andTarget Bonus at least equal to the Executive’s Base Salary and Target Bonus at such time, or (3) by Executive for Good Reason (as defined herein), subject to execution of a Release substantially in the form attached as Exhibit Dwithin 30 days following Executive’s termination of employment with the Company, Executive shall be entitled to the benefits set forth below in this Section 5(a). 

(i) The Company shall pay Executive an amount equal to the sum of (A) 1.5 times Executive’s Base Salary, plus (B) 1.5times Executive’s Target Bonus (as in effect on the date of Executive’s termination), plus (C) 2.0 times the Company’s annual cost for life insurance and long-term disability 

insurance provided to Executive immediately prior to his termination of employment (calculated by multiplying the monthly cost for such coverage at the timeof Executive’s termination of employment by 12), plus (D) 2.0 times the sum of (1) the annual matching contribution which Executive received under the Employee Savings Plan and Supplemental Benefit Plan for the year immediatelypreceding the year in which Executive’s employment with the Company terminates, plus (2) the fixed profit sharing and discretionary profit sharing contributions which Executive received under the Employee Savings Plan and SupplementalBenefit Plan for the year immediately preceding the year in which Executive’s employment with the Company terminates. The severance amount described in the previous sentence shall be paid in a lump sum on the date that is six months andone day after Executive experiences a “separation from service” (within the meaning of Section 409A(a)(2)(A)(i) of the Code) with the Company. 

(ii) The Executive LTIP shall be governed by the terms of the applicable LTIP Award Agreements. 

(iii) The Company shall pay Executive the amounts described in Section 5(e) within 14 days after the date of termination ofExecutive’s employment. In addition, the Company shall pay Executive a pro rata portion of Executive’s Target Bonus for the fiscal year in which Executive’s termination of employment occurs, based on the number of days in such fiscalyear during which Executive was employed. The pro rata bonus payment described in the previous sentence shall be paid in a lump sum on the date that is six months and one day after Executive experiences a “separation from service” with theCompany. 

(iv) During the period of 18 months following Executive’s termination of employment in accordance withSection 5(a), the Company shall provide to Executive continued coverage under the medical, dental and other group health benefits and plans in effect for senior executives of the Company, as in effect on the date of Executive’s terminationof employment (or substantially comparable coverage) for Executive and, where applicable, Executive’s spouse, dependents and beneficiaries, at the same contribution or premium rate as may be charged from time to time to senior executives of theCompany generally, as if Executive had continued in employment during such period.

(v) The Company shall pay Executive alump sum amount equal to the cost of an additional six months of coverage under the medical, dental and vision plans in which Executive participates on the date his employment terminates. The cost of coverage for each month shall equal the excess ofCOBRA premiums charged for medical, dental and vision benefits, less the employee monthly contributions for such benefits paid by active senior executive employees of the Company. For purposes of calculating the COBRA premiums and the monthlyemployee premiums, the six months of coverage shall be deemed to begin at the end of the 18 month period described in subsection (iv), and shall be calculated using assumed annual inflation factors of 10% for medical benefits, 

 

2 

7% for dental benefits and 3% for vision benefits, which will be applied to each succeeding calendar year (or portion of a calendar year) for which the lumpsum payment applies. The lump sum amount described in this subsection (v) shall be paid on the date that is six months and one day after Executive experiences a “separation from service” with the Company. 

(vi) The Company shall provide a release substantially in the form attached hereto as Exhibit G. If the Company does notprovide the release required pursuant to this subsection (vi), the Release by the Executive shall be null, void and without effect, and Executive shall still receive all of the payments and benefits described in subsections (i) through(v) above. 

(b) Termination for Cause or Voluntary Resignation. In the event that Executive’s employment with theCompany is terminated (i) by the Board for Cause or (ii) by Executive’s resignation from the Company for any reason other than Good Reason or Disability (as defined herein), subject to applicable law, the Company agrees to thefollowing: 

(i) The Executive LTIP shall be governed by the terms of the applicable LTIP Award Agreements. 

(ii) The Company shall pay Executive the amounts described in Section 5(e) within 14 days after the date of termination ofExecutive’s employment. 

For purposes of this Agreement, Executive’s retirement shall be considered Executive’s resignationfrom the Company without Good Reason. 

(c) Death. In the event that Executive’s employment with the Company is terminatedas a result of Executive’s death, the Company agrees to the following: 

(i) The Company shall pay Executive’sestate a lump sum amount equal to his target Annual Bonus for the year of termination prorated for the number of days during such year that Executive was employed by the Company. Such payment shall be made 30 days after termination ofExecutive’s employment as a result of Executive’s death or, if such day is not a business day, on the first business day of the Company which is at least 30 days after Executive’s death. 

(ii) The Executive LTIP shall be governed by the terms of the applicable LTIP Award Agreements. 

(iii) The Company shall pay Executive’s estate the amounts described in Section 5(e) within 14 days after the date ofExecutive’s death. 

(d) Disability. In the event that Executive’s employment with the Company is terminated as aresult of Executive’s Disability, the Company agrees to the following: 

 

3 

(i) The Company shall pay Executive (or his legal representative, if applicable) ina lump sum payment an amount equal to his target Annual Bonus for the year of termination prorated for the number of days during such year that Executive was employed by the Company. Such payment shall be made on the date that is six months and oneday after Executive experiences a “separation from service” with the Company. 

(ii) The Executive LTIP shall begoverned by the terms of the applicable LTIP Award Agreements. 

(iii) The Company shall pay Executive the amountsdescribed in Section 5(e) within 14 days after the date of termination of Executive’s employment. 

(e) Earned But UnpaidCompensation. In the case of any termination of Executive’s employment with the Company, Executive or his estate or legal representative shall be entitled to receive, to the extent permitted by applicable law, from the Company(i) Executive’s Base Salary through the date of termination to the extent not previously paid, (ii) to the extent not previously paid, the amount of any bonus, incentive compensation, and other compensation earned and payable toExecutive as of the date of Executive’s termination of employment under any compensation and benefit plans, programs or arrangements maintained in force by the Company (for this purpose, Executive’s Annual Bonus, if any, for any fiscalyear of the Company ended prior to the year of termination that is then unpaid, shall be deemed to be earned and payable to Executive) and (iii) any vacation pay, expense reimbursements and other cash entitlements due and owing to Executive, inaccordance with Company policy, as of the date of termination to the extent not previously paid. 

(f) Equity Awards and OtherPlans. Any Restricted Stock Units, Stock Options and other equity awards outstanding under any Company long term incentive plans or arrangements (other than the Executive LTIP) shall be paid in accordance with the terms of the plans orarrangements under which such awards were granted. All benefits accrued by Executive under all benefit plans and qualified and nonqualified retirement, pension, 401(k) and similar plans and arrangements of the Company shall be paid in such mannerand at such times as are provided under the terms of such plans and arrangements. 

(g) Termination Without Cause, Non-Renewal or forGood Reason as a Result of a Change of Control. In the event of Executive’s termination of employment with the Company following a Change of Control (1) by the Company without Cause, (2) as a result of the failure of theCompany to offer to renew the Agreement on terms that are consistent with competitive practices for companies of comparable size and standing in the same industry, or (3) by Executive for Good Reason, in any case, during the period beginningsix months before and ending two years following a Change of Control (as defined herein) of the Company, subject to execution of a Release 

 

4 

substantially in the form attached as Exhibit D within 30 days following Executive’s termination of employment with the Company, Executive shall beentitled to the benefits set forth below in this Section 5(g), and such benefits shall be in lieu of, and not in addition to any benefits the Executive would otherwise be entitled to under Section 5(a). 

(i) The Company shall pay Executive the payments set forth in Section 5(a)(i) except the applicable multiplier shall be 3.0(rather than 1.5 or 2.0, as applicable); provided, however, that in determining the amount of payment due under Section 5(a)(i), Executive’s actual Annual Bonus for the year preceding the Change of Control shall be used, ifhigher than his Target Bonus. The severance amount described in the previous sentence shall be paid in a lump sum on the date that is six months and one day after Executive experiences a “separation from service” with the Company.

(ii) The Company shall provide the benefits set forth in Section 5(a)(iv). In addition, the Company shall payExecutive a lump sum amount equal to the cost of an additional 18 months of coverage under the medical, dental and vision plans in which Executive participates on the date his employment terminates. The cost of coverage for each month shall equalthe excess of COBRA premiums charged for medical, dental and vision benefits, less the employee monthly contributions for such benefits paid by active senior executive employees of the Company. For purposes of calculating the COBRA premiums and themonthly employee premiums, the 18 months of coverage shall be deemed to begin at the end of the 18 month period described in Section 5(a)(iv), and shall be calculated using assumed annual inflation factors of 10% for medical benefits, 7% fordental benefits and 3% for vision benefits, which will be applied to each succeeding calendar year (or portion of a calendar year) for which the lump sum payment applies. The lump sum amount described in this subsection (ii) shall be paid onthe date that is six months and one day after Executive experiences a “separation from service” with the Company. 

(iii) The Executive LTIP shall fully vest, to the extent not already vested, and otherwise be governed by the terms of the applicable LTIP Award Agreements. 

(iv) The Company shall pay Executive the amounts described in Section 5(e) within 14 days of the date of termination ofExecutive’s employment. 

(v) The Company shall provide a release substantially in the form attached hereto asExhibit G. If the Company does not provide the release required pursuant to this subsection (v), the Release by the Executive shall be null, void and without effect, and Executive shall still receive all of the payments and benefitsdescribed in subsections (i) through (iv) above. 

 

5 

(h) Excess Parachute Payments. 

(i) In the event any payment granted to Executive pursuant to the terms of this Agreement or otherwise (a “Payment”) isdetermined to be subject to any excise tax (“Excise Tax”) imposed by Section 4999 of the Code (or any successor to such Section), the Company shall pay to Executive an additional amount (a “Gross-Up Payment”) which, afterthe imposition of all income, employment, excise and other taxes, penalties and interest thereon, is equal to the sum of (A) the Excise Tax on such Payment plus (B) any penalty and interest assessments associated with such Excise Tax;provided, however, that the amount of the Gross Up Payment shall not exceed $2 million. The Gross-Up Payment described in the previous sentence shall be paid in a lump sum on the date that is six months and one day after Executive experiences a“separation from service” with the Company. 

(ii) The determinations to be made with respect to thisSection 5(h) shall be made by a certified public accounting firm designated by the Company and reasonably acceptable to Executive and Executive may rely on such determination in making payments to the Internal Revenue Service. 

(i) No Other Payments. Except as expressly provided in this Section 5, all of Executive’s rights to salary, bonuses, employeebenefits and other compensation hereunder which would have accrued or become payable after the termination or expiration of the Employment Period shall cease upon such termination or expiration, other than those expressly required under applicablelaw. Any period during which benefits are provided to Executive or his spouse or dependants under Section 5(a)(iv) or Section 5(g)(ii) shall count towards the period for which Executive or his spouse or dependants are eligible forcontinuation coverage under Code Section 4980B or Part 6 of Title I of the Employee Retirement Income Security Act of 1974, as amended, or other applicable law. 

**3. Sections 5(h) and 5(i) of the Employment Agreement are renumbered as Sections 5(j) and 5(k) and the last paragraph of Section 5(k) is amended to read as follows:**

Notwithstanding the foregoing, Executive agrees that he shall not be entitled to terminate his employment for Good Reason in the event he is subject toany unintended or adverse tax consequences under Section 409A of the Code, the Company amends this Agreement or the terms of any employee benefit plan, program arrangement or agreement to avoid such adverse tax consequences or he is required toforfeit incentive or other compensation pursuant to Section 304 of SOX. For purposes of this Agreement, Executive is not entitled to assert that his termination is for Good Reason unless Executive gives the CEO written notice describingthe event or events which are the basis for such termination within ninety (90) days after the event or events occur and such grounds for termination (if susceptible to correction) are not corrected by the Company within 30 days of theCompany’s receipt of such notice to the reasonable, good faith satisfaction of Executive. 

 

6 

**4. Section 19 of the Employment Agreement is amended to read as follows:**

19. Compliance with Section 409A of the Code. To the extent this Agreement is subject to Section 409A of Code, the Company, Services and Executiveintend all payments under this Agreement to comply with the requirements of such section, and this Agreement shall, to the extent reasonably practicable, be operated and administered to effectuate such intent. To the extent necessary to avoidadverse tax consequences under Section 409A of the Code, the timing of any payment under this Agreement shall be delayed by six months and one day in a manner consistent with Section 409A(a)(2)(B)(i) of the Code. 

**5. Except as amended by this Amendment Number Two, the Employment Agreement remains in effect as originally executed.**

 

7 

IN WITNESS WHEREOF, the parties have executed this Amendment Number Two to the Employment Agreement as of the date firstset forth above. 

 
**MIRANT CORPORATION** By: 
** **
 Its:  Senior Vice President, Administration **MIRANT SERVICES, LLC** By: 
** **
 
Its:  Senior Vice President, Administration

** **
 
S. Linn Williams

 

8