Exhibit 10.1

 
FIRST AMENDMENT TO CREDIT AGREEMENT

THIS FIRST AMENDMENT TO CREDIT AGREEMENT (this “First Amendment”), dated as of
August 29, 2006 (the “Effective Date”), is by and among STORM CAT ENERGY (USA)
CORPORATION, a Colorado corporation (“Borrower”), STORM CAT ENERGY CORPORATION,
a corporation amalgamated under the laws of British Columbia (“Parent”), and
JPMORGAN CHASE BANK, N.A., a national banking association, as Global
Administrative Agent (“Global Administrative Agent”) and the sole financial
institution a party hereto as a Lender (“Lender”).

W I T N E S S E T H:

WHEREAS, Borrower, Parent, Global Administrative Agent and Lender are parties to
that certain Credit Agreement dated as of July 28, 2006 (as amended by this
First Amendment, the “Credit Agreement”) (unless otherwise defined herein, all
terms used herein with their initial letter capitalized shall have the meaning
given such terms in the Credit Agreement); and

WHEREAS, Borrower and Parent have requested that Lender (i) amend certain terms
of the Credit Agreement in certain respects, (ii) establish a Global Borrowing
Base and U.S. Borrowing Base in each case in the amount of U.S. $20,000,000, to
be effective as of the Effective Date and continuing until the next
redetermination or other adjustment of the Global Borrowing Base and the U.S.
Borrowing Base thereafter, and (iii) consent to certain transactions more
particularly described herein; and

WHEREAS, subject to and upon the terms and conditions set forth herein, Lender
has agreed to Borrower’s and Parent’s requests.

NOW THEREFORE, for and in consideration of the mutual covenants and agreements
herein contained and other good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged and confessed, Borrower, Parent,
Global Administrative Agent and Lender hereby agree as follows:
SECTION 1 Amendments. In reliance on the representations, warranties, covenants
and agreements contained in this First Amendment, and subject to the
satisfaction of each condition precedent set forth in Section 4 hereof, the
Credit Agreement is hereby amended effective as of the Effective Date in the
manner provided in this Section 1.

1.1 Amendment to Definitions. The definitions of “Loan Document,” “Obligations”
and “Security Documents” contained in Section 1.1 of the Credit Agreement shall
be amended to read in full as follows:

“Loan Document” means (1) this Agreement, the First Amendment, the Notes, the
Secured Bridge Note, the Security Documents, the Fee Letter, the Intercreditor
Agreement, the Facility Guaranties, the Hedging Agreements between Borrower,
Parent or any of its Restricted Subsidiaries and any Lender or any Affiliate of
a Lender, any Borrowing Request, any Interest Election Request, any election
notice, and any agreement with respect to fees described in Section 2.11, and
(2) each other agreement, document or instrument delivered by Parent, Borrower
or any other Loan Party in connection with this Agreement or the Secured Bridge
Note, as amended, supplemented, restated or otherwise modified from time to
time. For avoidance of doubt, the term “Loan Document” shall not include the
Canadian Loan Documents.

 
 

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

 
“Obligations” means, at any time, the sum of ii)(1) the aggregate Credit
Exposure of the Lenders under the Loan Documents plus (2) all accrued and unpaid
interest and fees owing to the Lenders under the Loan Documents plus (3) all
Hedging Obligations in connection with all Hedging Agreements between Borrower,
Parent or any of its Restricted Subsidiaries and any Lender or any Affiliate of
a Lender plus (4) the “Obligation” (as defined in the Secured Bridge Note) of
Borrower to JPMorgan Chase Bank, N.A. as “Payee” under and as defined in the
Secured Bridge Note plus (5) all other obligations (monetary or otherwise) of
Borrower, Parent or any Restricted Subsidiary to any Lender or any Agent,
whether or not contingent, arising under or in connection with any of the Loan
Documents.

“Security Documents” means each Facility Guaranty, each Mortgage, each Pledge
Agreement, the Confirmation and Ratification Agreement, each Canadian Security
Document and each other instrument or document executed and delivered pursuant
to Section 5.12 or Section 5.15 or pursuant to the Loan Documents to secure any
of the Obligations.

1.2 Additional Definitions. Section 1.1 of the Credit Agreement shall be amended
to add the following definitions to such Section:

“BBC” means Bill Barrett CBM, L.L.C., a Texas limited liability company.

“BBC Acquisition” means the purchase by Borrower (or, as applicable, Storm Cat
Powder River) of the BBC Assets pursuant to the BBC Acquisition Agreement, which
purchase shall be on terms and conditions reasonably acceptable to Global
Administrative Agent and Lender.

“BBC Acquisition Agreement” means that certain Purchase and Sale Agreement dated
July 17, 2006, by and between BBC, as seller, and Borrower, as buyer, as amended
through the Effective Date (as defined in the First Amendment).

“BBC Acquisition Documents” means the BBC Acquisition Agreement and all other
agreements, assignments, deeds, conveyances, certificates and other documents
and instruments now or hereafter executed and/or delivered by, between or among
Borrower, Storm Cat Powder River and BBC pursuant to the BBC Acquisition
Agreement or in connection with the BBC Acquisition.

“BBC Assets” means, collectively, the “Assets” as such term is defined in the
BBC Acquisition Agreement.

“BBC Reserve Report” means an engineering and economic analysis of the BBC
Assets prepared as of July 1, 2006 by Netherland, Sewell & Associates, Inc.

 
 

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

 
“Confirmation and Ratification Agreement” means that certain Confirmation and
Ratification Agreement dated as of August 29, 2006, by each Loan Party for the
benefit of JPMorgan Chase Bank, N.A. as Global Administrative Agent, as a Lender
and as payee under the Secured Bridge Note.

“First Amendment” means that certain First Amendment to Credit Agreement dated
as of August 29, 2006, among Parent, Borrower, Global Administrative Agent and
Lenders party thereto.

“Secured Bridge Note” means that certain Secured Promissory Note executed by
Borrower and payable to the order of JPMorgan Chase Bank, N.A., in its
individual capacity as payee under the Secured Bridge Note and not as Global
Administrative Agent, in the original principal amount of $15,000,000, which
promissory note shall be secured by the Collateral and payable as provided
therein.

“Storm Cat Powder River” means Storm Cat Energy (Powder River) LLC, a Colorado
limited liability company.

1.3 Amendment to Total Funded Debt to EBITDA Covenant. Section 6.1 of the Credit
Agreement shall be amended to read in full as follows:

“Section 6.1 Ratio of Total Funded Debt to EBITDA. As of the end of any fiscal
quarter, commencing with the fiscal quarter ending December 31, 2006, Parent
will not permit its ratio of Total Funded Debt outstanding to Annualized EBITDA
to be greater than (a) subject to the proviso below, for the fiscal quarters
ending December 31, 2006 and March 31, 2007, 5.00 to 1.00, and (b) for the
fiscal quarter ending June 30, 2007 and for each fiscal quarter thereafter, 3.00
to 1.00; provided, that, in the event the Indebtedness evidenced by the Secured
Bridge Note is paid in full pursuant to its terms (i) on or prior to
December 31, 2006, the ratio set forth in clause (a) of this Section 6.1 shall
be automatically amended to be 3.50 to 1.00 for the fiscal quarters ending
December 31, 2006 and March 31, 2007, and (ii) after December 31, 2006 but on or
prior to March 31, 2007, the ratio set forth in clause (a) of this Section 6.1
shall be automatically amended to be 5.00 to 1.00 for the fiscal quarter ending
December 31, 2006 and 3.50 to 1.00 for the fiscal quarter ending March 31, 2007,
in each case without any further action on the part of Parent, Borrower, Global
Administrative Agent or any Lender.”

1.4 Amendment to Debt Covenant. Section 7.1 of the Credit Agreement shall be
amended to (6) re-number clauses (x) and (xi) thereof to be clauses (xi) and
(xii), respectively, and (7) add thereto a new clause (x) which shall read in
full as follows:

“(x) Indebtedness of Borrower evidenced by the Secured Bridge Note and Guarantee
obligations of any Loan Party (other than Borrower) in respect thereof pursuant
to the Security Documents.”

1.5 Amendment to Events of Default Provision. Section 8.1 of the Credit
Agreement shall be amended to add thereto a new clause (l) which shall read in
full as follows:

 
 

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

 
“(l) Event of Default under Secured Bridge Note. Any “Event of Default” as
defined in the Secured Bridge Note shall occur.”
 
SECTION 2 Global Borrowing Base and U.S. Borrowing Base; Allocation of Global
Borrowing Base. In reliance on the representations, warranties, covenants and
agreements contained in the Credit Agreement and this First Amendment, and
subject to the satisfaction of each condition precedent set forth in Section 4
hereof, Borrower, Parent, Global Administrative Agent and Lender agree that
(8) the Borrowing Base and the U.S. Borrowing Base in effect for the period from
and after the Effective Date until the next redetermination or other adjustment
of the Global Borrowing Base and U.S. Borrowing Base thereafter shall each be
U.S. $20,000,000, (9) the redetermination provided for in clause (a) of this
Section 2 shall not be construed or deemed to be a discretionary redetermination
for purposes of Section 2.7(e) of the Credit Agreement, (10) the Allocated U.S.
Borrowing Base shall be U.S. $20,000,000 as of the Effective Date, and (11) the
Allocated Canadian Borrowing Base shall be U.S. $0 as of the Effective Date.
 
SECTION 3 Consent and Waiver. Parent and Borrower have requested that Lender
(12) consent to (a) the BBC Acquisition, and (b) the incurrence of the
Indebtedness evidenced by the Secured Bridge Note (the transactions described in
subclauses (i) and (ii) of this clause (a) being collectively referred to as the
“Subject Transactions”), and (13) waive (a) any provision of the Credit
Agreement and the other Loan Documents to the extent such provisions prohibit
the consummation of the Subject Transactions, and (b) any and all remedies and
other rights under the Credit Agreement and the other Loan Documents in respect
of any Default or Event of Default to the extent, but only to the extent,
occurring solely from the consummation of the Subject Transactions. In reliance
on the representations, warranties, covenants and agreements contained in the
Credit Agreement and this First Amendment, and subject to the satisfaction of
the conditions precedent set forth in Section 4 hereof (and in the Credit
Agreement, as applicable), Lender hereby (x) consents to the Subject
Transactions, and (y) waives (i) any provision of the Credit Agreement and the
other Loan Documents to the extent such provisions prohibit the consummation of
the Subject Transactions, and (ii) any and all remedies and other rights under
the Credit Agreement and the other Loan Documents in respect of any Default or
Event of Default to the extent, but only to the extent, occurring solely from
the consummation of the Subject Transactions. The consents and waivers contained
in this Section 3 are limited solely to the Subject Transactions, and the
applicable provisions of the Credit Agreement and the other Loan Documents to
the extent they prohibit the consummation of, or provide rights and remedies in
respect of the consummation of, such transactions. Nothing contained herein
shall be deemed (i) a consent to any action other than the consummation of the
Subject Transactions, or (ii) a waiver of any provisions of the Credit Agreement
or any other Loan Document except to the extent any such provision prohibits the
consummation of, or provides rights and remedies in respect of the consummation
of, the Subject Transactions.
 
SECTION 4 Conditions Precedent. The effectiveness of (14) the amendments to the
Credit Agreement contained in Section 1 hereof, (15) the increase in the Global
Borrowing Base and U.S. Borrowing Base contained in Section 2 hereof, and
(16) the consents and waivers contained in Section 3 hereof, is subject to the
satisfaction of each condition precedent set forth in this Section 4:

 
 

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

 
4.1 Closing Deliveries. Global Administrative Agent shall have received each of
the following documents, instruments and agreements, each of which shall be in
form and substance, and, as applicable, executed in such counterparts, as shall
be acceptable to Global Administrative Agent and Lender:

(a) a fully executed copy of the BBC Acquisition Agreement and all other
material documents, instruments and agreements executed and/or delivered by any
Loan Party in connection with the BBC Acquisition Agreement and the closing of
the BBC Acquisition, together with a certificate from an Authorized Officer of
Borrower certifying that (i) such copies are accurate and complete and represent
the complete understanding and agreement of the parties thereto, (ii) no
material right or obligation of any party thereto has been modified, amended or
waived, and (iii) subject only to the establishment of the Global Borrowing Base
and U.S. Borrowing Base described in Section 2 hereof and the disbursement and
application of proceeds in connection therewith and in connection with the
Secured Bridge Note, the BBC Acquisition will be consummated on the terms set
forth in the BBC Acquisition Agreement;

(b) all environmental reports that Borrower has obtained in connection with the
BBC Acquisition, which reports shall be reasonably acceptable to Global
Administrative Agent and its counsel;

(c) Mortgages and amendments to Mortgages duly executed and delivered by
Borrower or, as applicable, Storm Cat Powder River, together with such other
assignments, conveyances, amendments, agreements and other writings, including,
without limitation, UCC-1 and UCC-3 financing statements, in form and substance
satisfactory to Global Administrative Agent, pursuant to which, among other
things, (17) Borrower or, as applicable, Storm Cat Powder River, shall grant to
Global Administrative Agent a first and prior Lien, subject only to Permitted
Encumbrances, in and to the BBC Assets constituting Borrowing Base Properties,
and (18) the existing Mortgages shall be amended to evidence and reflect the
Secured Bridge Note;

(d) the Confirmation and Ratification Agreement duly executed and delivered by
each Loan Party;

(e) opinions dated the Effective Date, addressed to Global Administrative Agent
and all Lenders from (19) Hogan & Hartson L.L.P., counsel to Parent and
Borrower, and (20) local counsel in the State of Wyoming, in each case in form
and substance acceptable to Global Administrative Agent and its counsel; and

(f) such other documents, instruments and agreements as Global Administrative
Agent may reasonably require in connection with this First Amendment and the
transactions contemplated hereby.

4.2 BBC Acquisition. Subject only to the establishment of the Global Borrowing
Base and U.S. Borrowing Base described in Section 2 hereof and the disbursement
and application of proceeds in connection therewith and in connection with the
Secured Bridge Note, Borrower shall have completed the BBC Acquisition in
accordance with the terms of the BBC Acquisition Agreement, and as a result
thereof, Borrower (or, as applicable, Storm Cat Powder River) shall have
acquired good title to the BBC Assets, free and clear of all Liens except
Permitted Encumbrances. Upon completion of the BBC Acquisition, the
representations and warranties contained in Section 3.5, Section 3.15 and
Section 3.16 of the Credit Agreement will not be inaccurate in any material
respect.

 
 

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

 
4.3 Title Review. Global Administrative Agent or its counsel shall have
completed a satisfactory review of title to not less than 80% of the Present
Value of the BBC Assets evaluated for purposes of establishing the amount of the
Global Borrowing Base set forth in Section 2 hereof, and such review shall not
have revealed any condition or circumstance which would reflect that the
representations and warranties contained in Section 3.5 of the Credit Agreement
are inaccurate in any respect.

4.4 Hedging Agreements. Borrower shall have entered into Hedging Agreements with
Approved Counterparties and the notional volumes for which are not less than 80%
of the reasonably anticipated projected production from proved, developed,
producing Oil and Gas Properties (including, without limitation, the BBC
Assets), and which Hedging Agreements shall have a term of three (3) years from
the Effective Date.

4.5 Secured Bridge Note. JPMorgan Chase Bank, N.A. shall have received the
original duly executed Secured Bridge Note, together with such other documents,
instruments and agreements required to be delivered in connection with such
Secured Bridge Note, and all conditions to the advance of the proceeds of such
Secured Bridge Note shall have been satisfied.

4.6 No Defaults. Prior to and after giving effect to the amendments contained in
Section 1 hereof, and at the time the BBC Acquisition is to be consummated, no
Default, Event of Default, Global Borrowing Base Deficiency or U.S. Borrowing
Base Deficiency shall exist, nor shall the consummation of such transaction
result in any Default, Event of Default, Global Borrowing Base Deficiency or
U.S. Borrowing Base Deficiency.

4.7 Fees and Expenses. Borrower shall have paid (21) all fee and amounts as
Borrower shall be required to pay to Global Administrative Agent and its
Affiliates pursuant to any separate agreement between or among Borrower, Global
Administrative Agent and/or its Affiliates, and (22) all reasonable fees and
expenses incurred by Global Administrative Agent in connection with the
preparation, negotiation and execution of this First Amendment, including,
without limitation, all reasonable fees and expenses of Vinson & Elkins L.L.P.,
counsel to Global Administrative Agent.

4.8 Other Documentation. Global Administrative Agent shall have received such
other documents, instruments and agreements as it or Lender may reasonably
request, all in form and substance reasonably satisfactory to Global
Administrative Agent and Lender.

 
 

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

 
SECTION 5 Representations and Warranties of Borrower. To induce Lender and
Global Administrative Agent to enter into this First Amendment, Parent and
Borrower hereby jointly and severally represent and warrant to Lender and Global
Administrative Agent as follows:

5.1 Due Authorization; No Conflict. The execution, delivery and performance by
Parent and Borrower of this First Amendment are within Parent’s and Borrower’s
corporate powers, have been duly authorized by all necessary action, require no
action by or in respect of, or filing with, any governmental body, agency or
official and do not violate or constitute a default under any provision of
applicable law or any material agreement binding upon Parent or Borrower or
result in the creation or imposition of any Lien upon any of the assets of
Borrower except Permitted Encumbrances.

5.2 Validity and Enforceability. This First Amendment constitutes the valid and
binding obligation of Parent and Borrower enforceable in accordance with its
terms, except as (23) the enforceability thereof may be limited by bankruptcy,
insolvency or similar laws affecting creditor’s rights generally, and (24) the
availability of equitable remedies may be limited by equitable principles of
general application.

5.3 Accuracy of Representations and Warranties. Each representation and warranty
of each Loan Party contained in the Loan Documents is true and correct in all
material respects as of the date hereof (except to the extent such
representations and warranties are expressly made as of a particular date, in
which event such representations and warranties were true and correct as of such
date).

5.4 Absence of Defaults. Prior to and after giving effect to the amendments
contained in Section 1 hereof, no Default or Event of Default has occurred which
is continuing.

5.5 No Defense. Borrower has no defense to payment of, or any counterclaim or
rights of set-off with respect to, all or any portion of the Obligations.

SECTION 6 Miscellaneous.

6.1 Reaffirmation of Loan Documents. Any and all of the terms and provisions of
the Credit Agreement and the Loan Documents shall, except as amended and
modified hereby, remain in full force and effect, and are hereby ratified and
confirmed. The amendments contemplated hereby shall not limit or impair any
Liens securing the Obligations, each of which are hereby ratified, affirmed and
extended to secure the Obligations.

6.2 Confirmation of Loan Documents and Liens. As a material inducement to Lender
to make the agreements and grant the consents, waivers and amendments set forth
herein, Parent and Borrower hereby (25) acknowledge and confirm the continuing
existence, validity and effectiveness of the Loan Documents and the Liens
granted thereunder, (26) agree that the execution, delivery and performance of
this First Amendment and the consummation of the transactions contemplated
hereby shall not in any way release, diminish, impair, reduce or otherwise
adversely affect such Loan Documents and Liens, and (27) acknowledge and agree
that the Liens granted under the Loan Documents secure, and after the
consummation of the transactions contemplated hereby will continue to secure,
the payment and performance of the Obligations as first priority perfected
Liens.

 
 

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

 
6.3 Parties in Interest. All of the terms and provisions of this First Amendment
shall bind and inure to the benefit of the parties hereto and their respective
successors and assigns.

6.4 Legal Expenses. Borrower hereby agrees to pay on demand all reasonable fees
and expenses of counsel to Global Administrative Agent incurred by Global
Administrative Agent in connection with the preparation, negotiation and
execution of this First Amendment.

6.5 Counterparts. This First Amendment may be executed in counterparts, and all
parties need not execute the same counterpart; however, no party shall be bound
by this First Amendment until Parent, Borrower and Lender have executed a
counterpart. Facsimiles shall be effective as originals.

6.6 Complete Agreement. THIS FIRST AMENDMENT, THE CREDIT AGREEMENT AND THE OTHER
LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT AMONG THE PARTIES AND MAY NOT BE
CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS OR ORAL AGREEMENTS OF THE
PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN OR AMONG THE PARTIES.

6.7 Headings. The headings, captions and arrangements used in this First
Amendment are, unless specified otherwise, for convenience only and shall not be
deemed to limit, amplify or modify the terms of this First Amendment, nor affect
the meaning thereof.

6.8 Effectiveness. This First Amendment shall be effective automatically and
without necessity of any further action by Parent, Borrower, Global
Administrative Agent or Lender when counterparts hereof have been executed by
Parent, Borrower and Lender, and all conditions to the effectiveness hereof set
forth herein and in the Credit Agreement have been satisfied (including, without
limitation, all conditions precedent set forth in Section 4 hereof).

6.9 GOVERNING LAW. THIS FIRST AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.

IN WITNESS WHEREOF, the parties hereto have caused this First Amendment to be
duly executed by their respective authorized officers on the date and year first
above written.

[Signature pages to follow]

 
 

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

 
 
SIGNATURE PAGE TO
FIRST AMENDMENT TO CREDIT AGREEMENT
BY AND AMONG
STORM CAT ENERGY CORPORATION,
STORM CAT ENERGY (USA) CORPORATION, AS BORROWER, AND
JPMORGAN CHASE BANK, N.A., AS GLOBAL ADMINISTRATIVE AGENT
AND THE SOLE LENDER PARTY THERETO
 

 
PARENT:

STORM CAT ENERGY CORPORATION,
a corporation amalgamated under the laws of British Columbia

By: /s/ J. Scott Zimmerman                                     
J. Scott Zimmerman, President and
Chief Executive Officer

BORROWER:

STORM CAT ENERGY (USA) CORPORATION,
a Colorado corporation

By:/s/ J. Scott Zimmerman                                       
J. Scott Zimmerman, President

[Signature Page]
 
 

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

 
 
SIGNATURE PAGE TO
FIRST AMENDMENT TO CREDIT AGREEMENT
BY AND AMONG
STORM CAT ENERGY CORPORATION,
STORM CAT ENERGY (USA) CORPORATION, AS BORROWER, AND
JPMORGAN CHASE BANK, N.A., AS GLOBAL ADMINISTRATIVE AGENT
AND THE SOLE LENDER PARTY THERETO

Each of the undersigned (i) consent and agree to this First Amendment, and (ii)
agree that the Loan Documents to which it is a party shall remain in full force
and effect and shall continue to be the legal, valid and binding obligation of
such Person, enforceable against it in accordance with its terms.
 

 
ACKNOWLEDGED AND AGREED TO BY:

STORM CAT ENERGY (POWDER RIVER) LLC,
a Colorado limited liability company

By:/s/ J. Scott Zimmerman                                       
J. Scott Zimmerman, Manager

STORM CAT ENERGY (USA) OPERATING CORPORATION, a Colorado corporation

By:/s/ J. Scott Zimmerman                                         
J. Scott Zimmerman, President

STORM CAT ENERGY (ALASKA) LLC,
a Colorado limited liability company

By:/s/ J. Scott Zimmerman                                          
J. Scott Zimmerman, Manager

TRIPLE CROWN GATHERING CORPORATION,
a Colorado corporation

By:/s/ J. Scott Zimmerman                                          
J. Scott Zimmerman, President

[Signature Page]
 
 

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

 

SIGNATURE PAGE TO
FIRST AMENDMENT TO CREDIT AGREEMENT
BY AND AMONG
STORM CAT ENERGY CORPORATION,
STORM CAT ENERGY (USA) CORPORATION, AS BORROWER, AND
JPMORGAN CHASE BANK, N.A., AS GLOBAL ADMINISTRATIVE AGENT
AND THE SOLE LENDER PARTY THERETO
 

 
GLOBAL ADMINISTRATIVE AGENT:

JPMORGAN CHASE BANK, N.A.,
as Global Administrative Agent

By:/s/ J. Scott Fowler                                               
J. Scott Fowler, Senior Vice President

LENDER:

JPMORGAN CHASE BANK, N.A.,
as a Lender

By:/s/ J. Scott Fowler                                                
J. Scott Fowler, Senior Vice President

[Signature Page]
 
 

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