EXHIBIT 4.40

                               Fifth Amendment to
                              Amended and Restated
                       Agreement of Limited Partnership of
                 Geodyne Institutional/Pension Energy Income
                             Limited Partnership P-6


     This  Fifth  Amendment  to  Amended  and  Restated   Agreement  of  Limited
Partnership of Geodyne  Institutional/Pension  Energy Income Limited Partnership
P-6 (the  "Partnership") is entered into by and between Geodyne Resources,  Inc.
("Resources"),  a Delaware  corporation,  as successor General Partner,  Geodyne
Institutional Depositary Company ("Depositary"),  a Delaware corporation, as the
Limited  Partner,   and  all  Substituted   Limited  Partners  admitted  to  the
Partnership.

     WHEREAS, on November 28, 1989, Geodyne Properties, Inc. ("Properties"),  as
General partner, and Depositary executed and entered into that certain Agreement
and Certificate of Limited Partnership of the Partnership (the "Agreement"); and

     WHEREAS,  on  September 5, 1990,  Properties  and  Depositary  executed and
entered  into  that  certain  PaineWebber/Geodyne  Institutional/Pension  Energy
Income  Limited  Partnership  P-6  Amended  and  Restated  Agreement  of Limited
Partnership (the "Amended and Restated Agreement"); and

     WHEREAS,  on February 25, 1993,  Properties  executed and entered into that
First Amendment to the Amended and Restated Agreement whereby it changed (i) the
name of the Partnership from "PaineWebber/Geodyne  Institutional/Pension  Energy
Income Limited Partnership P-6" to "Geodyne  Institutional/Pension Energy Income
Limited Partnership P-6", (ii) the address of the Partnership's  principal place
of business,  and (iii) the address for the  Partnership's  agent for service of
process; and

     WHEREAS,  on August 4, 1993,  Properties  executed  and  entered  into that
Second  Amendment  to the  Amended  and  Restated  Agreement  whereby it amended
certain  provisions  to (i) expedite  the method of accepting  transfers of Unit
Holders'  Units in the  Partnership  and (ii)  provide for an optional  right of
repurchase/redemption which may be exercised by the Unit Holders; and

     WHEREAS,  on August 31,  1995,  Properties  executed  and entered into that
Third Amendment to the Amended and Restated Agreement whereby it amended certain
provisions to allow transfers of Units facilitated through a matching service to
the extent that such transfers  otherwise  comply with Internal  Revenue Service
transfer  regulations  applicable to  non-permitted  transfers for  non-publicly
traded limited partnerships; and

                                      -1-
<PAGE>



     WHEREAS, on July 1, 1996, Resources, as successor via merger to Properties,
executed and entered into, as General Partner,  that certain Fourth Amendment to
the Amended and Restated  Agreement  whereby it amended  certain  provisions  to
provide that  Resources,  as successor via merger to Properties,  is the General
Partner of the Partnership; and

     WHEREAS,  Section 11.1 of the Amended and Restated  Agreement provides that
the general  partner of the  partnership  (the "General  Partner") may,  without
prior notice or consent of any Unit Holder (as defined in the Agreement),  amend
any provision of this Amended and Restated  Agreement  if, in its opinion,  such
amendment does not have a material adverse effect upon the Unit Holders; and

      WHEREAS,  Section 2.4 of the Agreement provides that the Partnership shall
continue in full force and effect until  December 31,  2005,  provided  that the
General Partner may extend the term of the Partnership for up to five periods of
two years each if it believes  each such  extension is in the best  interests of
the Unit Holders or until  dissolution  prior thereto pursuant to the provisions
of the Agreement, and

      WHEREAS,  Resources  as General  Partner has elected to extend the life of
the Partnership an additional two years.

      NOW,  THEREFORE,  in  consideration  of  the  covenants,   conditions  and
agreements herein contained, the parties hereto hereby agree as follows:

      Section 2.4. is hereby amended and restated as follows:

                  The  Partnership  shall  continue  in force and  effect  until
            December 31, 2007,  provided that the General Partner may extend the
            term of the  Partnership for up to four periods of two years each if
            it believes  such  extension  is in the best  interests  of the Unit
            Holders,   or  until  dissolution  prior  thereto  pursuant  to  the
            provisions hereof.


       IN WITNESS  WHEREOF,  the parties hereto have hereunto set their hands as
of the 27th day of October, 2005.

                                       Geodyne Resources, Inc.
                                       as General Partner

                                       By:  //s// Dennis R. Neill
                                            ----------------------
                                            Dennis R. Neill
                                            President

                                       Geodyne Institutional
                                       Depositary Company,
                                       as the Limited Partner

                                       By:  //s// Dennis R. Neill
                                            ----------------------
                                            Dennis R. Neill
                                            President

                                       Geodyne Resources, Inc.,
                                       as Attorney-in-Fact for all
                                       Substituted Limited Partners

                                       By:  //s// Dennis R. Neill
                                            ----------------------
                                            Dennis R. Neill
                                            President


                                      -2-