Exhibit 3.40

                         HERNDON PROCESSING COMPANY, LLC
                           A LIMITED LIABILITY COMPANY

                 AMENDED AND RESTATED LIMITED LIABILITY COMPANY
                                   AGREEMENT
                              (AS OF MARCH 3, 2003)

      This AMENDED AND RESTATED LIMITED LIABILITY COMPANY AGREEMENT is entered
into to be effective as of March 3, 2003, by McDowell-Wyoming Coal Company, LLC,
a Delaware limited liability company, as the sole member (the "Sole Member") of
the Company.

                                    ARTICLE I
                   FORMATION OF THE LIMITED LIABILITY COMPANY

1.1 FORMATION. On January 22, 2003, the Company was formed by filing duly
executed Articles of Organization with the West Virginia Secretary of State in
accordance with and pursuant to the provisions of the Act (as hereinafter
defined). On February 10, 2003, the Company adopted a Limited Liability Company
Agreement. On March 3, 2003, the Company changed its name from Hernpro, LLC to
"Herndon Processing Company, LLC" and this Amended and Restated Limited
Liability Agreement (the "Agreement") amends and restates the original Limited
Liability Agreement and such amendment and restatement is hereby consented to by
the Sole Member pursuant to Section 14.2. If there is a direct conflict between
the provisions of this Agreement and any mandatory, non-waivable provision of
the Act, such provision of the Act shall control. Unless the Act provides that a
provision may not be varied or superseded in the limited liability company
agreement (or otherwise by agreement of the members or managers of a limited
liability company), such provision shall be deemed superseded and waived in its
entirety if this Agreement contains a provision addressing the same issue or
subject matter. If any provisions of this Agreement would cause the Company not
to be disregarded for federal income tax purposes under the provisions of the
Code, such provisions of the Agreement shall be void to the extent necessary to
ensure the Company is disregarded for federal income tax purposes. If any
provision of this Agreement is inconsistent with the Articles of Organization,
this Agreement controls as to Managers (as defined below), members and members'
assignees or transferees, and the Articles of Organization control as to persons
other than Managers, members and their assignees or transferees who reasonably
rely on the Articles to their detriment.

      1.2 NAME. The name of the Company is Herndon Processing Company, LLC.

      1.3 BUSINESS. The business of the Company shall be to carry on any lawful
business.

      1.4 PRINCIPAL PLACE OF BUSINESS. The principal place of business of the
Company shall be located at Route 10, Herndon, WV 24726, or at such other place
or places as the Managers (as defined below) may from time to time determine.



                                   ARTICLE II
                                   DEFINITIONS

      The following terms shall have the following meanings:

      2.1 ACT. "Act" shall mean the Uniform Limited Liability Company Act in WV
Code, Chapter 31B, as amended.

      2.2 CAPITAL CONTRIBUTION. "Capital Contribution" means any contribution to
the capital of the Company in cash or property by the Sole Member pursuant to
Article V.

      2.3 CODE. "Code" means the Internal Revenue Code, as amended.

      2.4 WV CODE. "WV Code" means the Code of West Virginia of 1931, as amended
or recodified.

      2.5 MANAGER. "Manager" means a person elected by the Sole Member under
Article VIII of this Agreement and vested with the authority of a manager under
Article VIII of this Agreement and the Act.

      2.6 "MEMBERSHIP INTEREST" shall mean the Sole Member's entire interest in
the Company and such other rights and privileges that the Sole Member may enjoy
by being Sole Member.

      2.7 "SOLE MEMBER" shall refer to McDowell-Wyoming Coal Company, LLC, a
Delaware limited liability company.

                                   ARTICLE III
                                   SOLE MEMBER

            The name and mailing address of the Sole Member is McDowell-Wyoming
Coal Company, LLC, P.O. Box 2345, Abingdon, VA 24212.

                                   ARTICLE IV
                                LIMITED LIABILITY

            The Sole Member and the Managers, their agents, employees and
affiliates shall not have any liability under a judgment, decree, or order of a
court, or in any other manner, for a debt, obligation or liability of the
Company, except to the extent provided in the Act.

                                    ARTICLE V
                              CAPITAL CONTRIBUTIONS

      5.1 INITIAL CAPITAL. The Sole Member shall contribute cash of $1,000 as
its initial capital contribution.

      5.2 ADDITIONAL CAPITAL CONTRIBUTIONS. The Sole Member is not required to
make any additional capital contribution to the Company. To the extent
determined by the Sole Member, the Sole Member is permitted to make additional
capital contributions if and to the extent it determines that such additional
capital contributions are appropriate.

                                       2


      5.3 PAYMENTS BY THE COMPANY. All costs and expenses of the Company shall
be paid from its funds.

      5.4 UNITS. The Sole Member's Membership Interest shall be divided into
"Units." The Units shall be evidenced by the issuance to the Sole Member of a
Unit certificate. The number of Units held by the Sole Member shall be one (1).

                                   ARTICLE VI
                                  DISTRIBUTIONS

      Distributions shall be made to the Sole Member at the times and in the
aggregate amounts determined by the Sole Member. No distribution shall be
declared and paid if after such distribution is paid, the limited liability
company would not be able to pay its debts as they become due in the ordinary
course of business or the Company's total assets would be less than the sum of
its total liabilities plus the amount that would be needed, if the Company were
to be dissolved, wound up and terminated at the time of the distribution, to
satisfy any preferential rights upon dissolution, winding up and termination of
members whose preferential rights are superior to those receiving the
distribution or distribution. Furthermore no distribution shall be declared or
paid if the declaration or payment would cause the Company or any of its
subsidiaries to breach any material agreement.

                                   ARTICLE VII
                                   ALLOCATIONS

      The Company's profits and losses shall be allocated to the Sole Member.

                                  ARTICLE VIII
                                MANAGEMENT POWERS

      8.1 GENERAL POWERS. Management of the Company's business and affairs shall
be exclusively vested in a Board of one or more Managers (the "Board of
Managers") elected by the Sole Member. The Sole Member, by virtue of having the
status as a Member, shall have no management power over the business and affairs
of the Company or actual or apparent authority to enter into contracts on behalf
of, or to otherwise bind, the Company, provided, however that the Sole Member
shall have the right to execute certain required filings with governmental
authorities on behalf of the Company, including filings to qualify to do
business and filings with the United States Internal Revenue Service. The Board
of Managers shall elect and remove such officers (the "Officers") and hire such
employees as it deems appropriate. The Officers shall have the titles, terms,
power, authority, and duties as determined by the Board of Managers and the same
person may hold one or more offices. The Board of Managers and, to the extent of
the power, authority, and duties determined by the Board of Managers, the
Officers shall have full power and authority or do all things on such terms as
they, in their individual sole discretion, may deem necessary or appropriate to
conduct, or to cause to be conducted, the business and

                                       3


affairs of the Company. Without limiting the generality of the foregoing, the
Board of Managers shall have the right, power and authority on behalf of the
Company:

            (i) to develop, review and approve annual budgets, policies,
operating guidelines, and other key operational items for the Company;

            (ii) to arrange for such personnel as may be necessary or convenient
to carry out the business and affairs of the Company;

            (iii) to establish such reasonable cash reserves to provide for
anticipated expenses of the Company as the Board of Managers determines to be
necessary for timely payment of such expenses; and

            (iv) to direct the appropriate Officers of the Company to make,
execute, assign, acknowledge and file on behalf of the Company any and all
documents or instruments of any kind which the Board of Managers may deem
necessary or appropriate in carrying out the business and affairs of the
Company, including without limitation, powers of attorney, agreements of
indemnification, documents or instruments of any kind or character, and
amendments thereto (and no person, firm or corporation dealing with the Board of
Managers shall be required to determine or inquire into the authority or power
of the Board of Managers to bind the Company or to execute, acknowledge or
deliver any and all documents in connection therewith).

      8.2 BOARD OF MANAGERS. The Managers need not be Members of the Company.
The initial Manager serving on the Board of Managers shall be Harold C. Collins.
Except as otherwise provided herein, all decisions to be made or actions to be
taken by the Company with respect to the Company's business shall be made or
taken by the Board of Managers. Each Manager shall have one vote. Successor or
additional Managers shall be elected by the Sole Member. Any Manager may be
removed as a Manager, with or without cause, by the Sole Member.

      8.3 MEETINGS OF BOARD OF MANAGERS; ACTION IN LIEU OF MEETINGS. If at any
time there is more than one Manager, (a) meetings of the Board of Managers may
be held upon the written or telephonic request of any Manager, (b) attendance at
a meeting of a majority of the Board of Managers shall constitute a quorum for
the purpose of transacting business at that meeting, (c) the act of a majority
of the Managers present at a meeting of the Board of Managers at which a quorum
is present shall be deemed to constitute the act of the Board of Managers and
(d) the Board of Managers may conduct meetings by means of a conference
telephone or similar equipment and any person participating by such means shall
be deemed present in person at such meeting. The Board of Managers may also take
action without a meeting if a majority of the Managers on the Board of Managers
consent thereto in writing.

      8.4 DUTIES OF THE MANAGERS; FIDUCIARY RELATIONSHIP. Each Manager shall
perform his duties consistently with the obligation of good faith and fair
dealing, in a manner he

                                       4


reasonably believes to be in the best interests of the Company, and with such
care as an ordinarily prudent person in a like position would use under similar
circumstances. Except as provided in Section 9.2, no Manager shall have any
liability to the Company or its Members or assignees or transferees for monetary
damages for breach of fiduciary duty.

      8.5 POWERS OF THE BOARD OF MANAGERS; RELIANCE ON EXPERTS.

      (a) Except as otherwise provided in this Agreement, the Board of Managers
   shall have all the powers conferred upon managers by the Act and this
   Agreement, including but not limited to, (i) the right to choose and hire
   employees; and (ii) the right to select the provider of any insurance to or
   for the benefit of the Company, and purchase, modify or terminate any such
   insurance. The Board of Managers shall have no authority to do any act in
   contravention of either the Articles of Organization or this Agreement.

      (b) In performing its duties, the Board of Managers shall be entitled to
   rely on information, opinions, reports or statements of one or more agents of
   the Company whom the Managers reasonably believes to be reliable and
   competent in the matters presented or any attorney, public accountant or
   other person as to matters which the Managers reasonably believe to be within
   such person's professional or expert competence.

      8.6 RESIGNATIONS. Any Manager may resign at any time upon notice given in
writing or by electronic transmission. The resignation shall take effect at the
time specified therein, and if no time is specified, at the time of its receipt
by the President or Secretary of the Company. The acceptance of a resignation
shall not be necessary to make it effective.

                                   ARTICLE IX
                    INDEMNIFICATION OF OFFICERS AND MANAGERS

      9.1 INDEMNIFICATION. To the fullest extent permitted by the Act, the
Company shall indemnify its Managers, Officers, employees and agents, or persons
serving at the request of the Company as a manager, director, officer, employee
or agent of another entity, who was or is a party or is threatened to be made a
party to any threatened, pending or completed action, suit or proceeding,
whether civil, criminal or administrative (each, an "Indemnitee"), against and
from any personal loss, liability or damage incurred as a result of any act or
omission that such Indemnitee believes in good faith to be within the scope of
authority conferred by this Agreement, except for willful misconduct or gross
negligence.

      9.2 EXCULPATION OF LIABILITY OF MANAGERS. No Manager shall be liable for
errors in judgment or for any act or omission if such person acts consistently
with the obligation of good faith and fair dealing. Notwithstanding anything to
the contrary set forth in this Agreement, no Manager shall be liable to the
Company or to the Sole Member for monetary damages or losses sustained or
liabilities incurred as a result of any act or omission constituting a breach of
such Manager's or Officer's, employee's or agent's fiduciary duty, except: (i)
for a breach of such

                                       5


person's duty of loyalty or duty of care to the Company or the Sole Member; (ii)
for acts or omissions not consistent with such person's obligation of good faith
and fair dealing or which involve intentional misconduct or a knowing violation
of law; or (iii) for any transaction from which the Manager derived an improper
personal benefit. A Manager's duty of loyalty is limited to the following: (a)
to account to the Company and to hold as trustee for it any property, profit or
benefit derived by the Manager in the conduct or winding up of the Company's
business or derived from a use of the Company's property by the Manager,
including the appropriation of the Company's opportunity; (b) to refrain from
dealing with the Company in the conduct or winding up of the Company's business
as or on behalf of a party having an interest adverse to the Company; and (c) to
refrain from competing with the Company in the conduct of the Company's business
before the dissolution of the Company. A Manager's duty of care is limited to
refraining from engaging in grossly negligent or reckless conduct, intentional
misconduct or a knowing violation of law in the conduct of and winding up of the
Company's business. Without the prior written consent of the Sole Member, a
Manager may not transact any business with the Company that furthers the
Manager's own interest.

                                    ARTICLE X
                                   SOLE MEMBER

      10.1 ADMISSION OF MEMBERS. A person may be admitted to the Company as an
additional Member only upon the written consent of the Sole Member.

      10.2 VOTING. Unless otherwise expressly provided herein or in the Act, all
Company business and decisions requiring a vote of the Sole Member (including
any action required or permitted by the Act to be taken at a members' meeting)
shall be upon the written consent of the Sole Member.

                                   ARTICLE XI
                                   ACCOUNTING

      11.1 TITLE TO PROPERTY AND BANK ACCOUNTS. The Company's property shall be
held in the name of the Company. The funds of the Company shall be deposited in
the name of the Company in bank or brokerage accounts designated by the Board of
Managers and withdrawals therefrom shall be made upon the signature of the
Officers of the Company.

      11.2 BOOKS. To the extent required by the Act, the Board of Managers shall
maintain or cause to be maintained complete and accurate records and books of
account of the Company's affairs at the principal office of the Company. The
Company's books shall be kept on a calendar year accounting period and in
accordance with generally accepted accounting principles applied on a consistent
basis. The records and books of the Company shall be available to the Sole
Member for purposes relating to the Sole Member's interest in the Company for
inspection and copying at reasonable times and pursuant to other reasonable
standards set by the Board of Managers.

                                       6


                                   ARTICLE XII
                         TRANSFER OF MEMBERSHIP INTEREST

      The Sole Member may transfer or assign in whole or in part its Membership
Interest in the Company. The Sole Member's Membership Interest in the Company
shall be freely alienable.

                                  ARTICLE XIII
                                   DISSOLUTION

      13.1 EVENTS OF DISSOLUTION. The Company shall dissolve, and its affairs
shall be wound up, upon the first to occur of the following:

            (i) the written consent of the Sole Member to dissolve the Company;

            (ii) an event that makes it unlawful for all or substantially all of
the business of the Company to be continued, but any cure of illegality within
90 days after notice to the Company of the event is effective retroactively to
the date of the event; or

            (iii) the entry of a decree of judicial dissolution under Section
31B-8-801(b)(5) of the Act.

      13.2 BANKRUPTCY OF SOLE MEMBER. The bankruptcy of the Sole Member will not
cause the Sole Member to cease to be a Member of the Company and upon the
occurrence of such an event, the business of the Company shall continue without
dissolution.

      13.3 DISTRIBUTION OF ASSETS. In the event of dissolution, the Company
shall conduct any such activities as are necessary to wind up its affairs
(including the sale of the assets of the Company in an orderly manner), and the
assets of the Company shall be distributed in the manner, and in the order of
priority, set forth in Section 31B-8-806 of the Act.

                                   ARTICLE XIV
                               GENERAL PROVISIONS

      14.1 ENTIRE AGREEMENT. This Agreement embodies the entire understanding
and agreement of the Sole Member concerning the Company and supersedes any and
all prior negotiations, understandings or agreements in regard thereto.

      14.2 AMENDMENT. This Agreement may not be amended except pursuant to the
written consent of the Sole Member.

      14.3 HEIRS, SUCCESSORS AND ASSIGNS. Each and all of the covenants, terms,
provisions and agreements herein contained shall be binding upon and inure to
the benefit of the Sole Member and, to the extent permitted by this Agreement,
its respective heirs, legal representatives, successors and assigns.

      14.4 APPLICABLE LAW. This Agreement shall be construed in accordance with
and governed by the laws of the State of West Virginia.



                            [Signature on next page]

                                       8


      IN WITNESS WHEREOF, the Sole Member has executed this Agreement as of the
3rd of March, 2003.

                                  SOLE MEMBER:

                                McDowell-Wyoming Coal Company, LLC,
                                    a Delaware limited liability company

                                By: /s/ Anthony T. McGartland
                                    Anthony T. McGartland
                                    President and Manager

                                THE COMPANY:

                                Herndon Processing Company, LLC,
                                    a West Virginia limited liability company

                                By: /s/ Harold C. Collins
                                    Harold C. Collins
                                    President and Manager

                                       9