<PAGE>






                                  EXHIBIT 10.31


                                 THIRD AMENDMENT
                                       OF
                         USG CORPORATION RETIREMENT PLAN

            (As Amended and Restated Effective as of January 1, 1999)



                  WHEREAS, USG Corporation Retirement Plan (the "plan") is
maintained by USG Corporation (the "company"), which plan was amended and
restated on December 29, 1999, effective as of January 1, 1999; and

                  WHEREAS, it now is deemed desirable and in the best interests
of the employers under the plan and their employees to further amend the plan;

                  NOW, THEREFORE, pursuant to the amending power reserved to the
company under subsection 14.1 of the plan, the plan is further amended as
follows:

                  1. By adding the following at the end of subsection 7.13 of
the plan, effective January 1, 2002:

         "A portion of a distribution shall not fail to be an eligible rollover
         distribution merely because the portion consists of after-tax employee
         contributions which are not includible in gross income. However, such
         portion may be transferred only to an individual retirement account or
         annuity described in Section 408(a) or (b) of the Internal Revenue
         Code, or to a qualified defined contribution plan described in Section
         401(a) or 403(a) of the Internal Revenue Code that agrees to separately
         account for amounts so transferred, including separately accounting for
         the portion of such distribution which is includible in gross income
         and the portion of such distribution which is not so includible."


                  2. By substituting the following for subparagraph 8.5(a) and
the first sentence of subparagraph 8.5(b) of the plan, effective January 1,
2002:



                                       92


<PAGE>


                  (a)      For purposes of determining the amount of a
                           participant's contributions required under subsection
                           2.5, the annual compensation limit is $200,000 for
                           the plan year commencing on January 1, 2002 and for
                           each subsequent plan year shall be $200,000 (or such
                           greater amount as permitted as a result of an
                           adjustment under Section 401(a)(17)(B) of the
                           Internal Revenue Code effective for that plan year).

                  (b)      For the purpose of determining a participant's final
                           average earnings of a participant who has an hour of
                           service on or after January 1, 2002, the annual
                           compensation limit for any 12-month period commencing
                           in a plan year shall be $200,000 (or such greater
                           amount as permitted as a result of an adjustment
                           under Section 401(a)(17)(B) of the Internal Revenue
                           Code effective for the plan year in which such
                           12-month period begins)."


                  3. By deleting subparagraph 8.13(a) from the plan (except for
purposes of numbering), effective January 1, 2002.

                  4. By substituting the following for the first sentence of
subsection 8.15 of the plan, effective January 1, 2002:

                      "For each plan year, the annual addition (as defined
                  below) to a participant's accounts under all defined
                  contribution plans maintained by the company shall not exceed
                  the lesser of $40,000 (or such greater amount as may be
                  determined by the Commissioner of Internal Revenue for the
                  calendar year which begins with or within that plan year) or
                  100% percent of the participant's Section 415 compensation
                  (as defined below) during that plan year."

                  5. By substituting the following for the first three sentences
of subsection 8.16 of the plan, effective January 1, 2002:

                      "Notwithstanding any other provisions of the plan, a
                  participant's annual retirement income or annual deferred
                  vested benefit as of the end of any plan year may not exceed
                  an amount which is equivalent to an annual retirement income
                  or deferred vested benefit payable for life only (not taking
                  into account that portion of any joint and survivor annuity
                  which constitutes a qualified joint and survivor annuity under
                  the Internal Revenue Code), equal to $160,000 (or such greater
                  amount as may be determined by the Commissioner of Internal
                  Revenue for calendar years which begin with or within that
                  plan year). If payment of a participant's retirement income or
                  deferred vested benefit begins before he attains age 62, such
                  limitation shall be reduced so that it is equivalent to an
                  annual benefit of $160,000 commencing at age 62. If payment of
                  a participant's



                                       93

<PAGE>


                  monthly retirement income begins after he attains age 65, such
                  limitation shall be increased so that it is equivalent to an
                  annual benefit of $160,000 commencing at age 65."

                  6. By substituting the following for subparagraph 17.2(b) of
the plan, effective January 1, 2002:

                  (b)      The present value of a participant's accrued benefits
                           or account balances shall be increased by the
                           distributions made with respect to the participant
                           under the plan and any plan aggregated with the plan
                           under Section 416(g)(2) of the Internal Revenue Code
                           during the 1-year period ending on the determination
                           date. The preceding sentence shall also apply to
                           distributions under a terminated plan which, had it
                           not been terminated, would have been aggregated with
                           the plan under Section 416(g)(2)(A)(i) of the
                           Internal Revenue Code. In the case of a distribution
                           made for a reason other than severance from
                           employment, death, or disability, this provision
                           shall be applied by substituting '5-year period' for
                           '1-year period.' The accrued benefits and accounts of
                           any individual who has not performed services for the
                           employer during the 1-year period ending on the
                           determination date shall not be taken into account."


                  7. By substituting the following for subsection 17.3 of the
plan, effective January 1, 2002:

         "17.3 Key Employee

               Key employee means any employee or former employee (including any
         deceased employee) who at any time during the plan year that includes
         the determination date was an officer of the employer having annual
         compensation greater than $130,000 (as adjusted under Section 416(i)(1)
         of the Internal Revenue Code for plan years beginning after December
         31, 2002), a 5-percent owner of the employer, or a 1-percent owner of
         the employer having annual compensation of more than $150,000. For this
         purpose, annual compensation means compensation within the meaning of
         Section 415(c)(3) of the Internal Revenue Code. The determination of
         who is a key employee will be made in accordance with Section 416(i)(1)
         of the Internal Revenue Code and the applicable regulations and other
         guidance of general applicability issued thereunder."


                                       94

<PAGE>


                  8. By substituting the following for Paragraph A-6 of Exhibit
A to the plan, effective January 1, 2003:

                  "A-6. Mortality. The mortality factors under the plan shall be
         taken from the 1994 Uninsured Pensioner Mortality Table projected to
         2002 (UP94@2002) with weighted annuity factors assuming a population of
         90 percent males and 10 percent females. Notwithstanding the above, for
         purposes of determining the lump sum actuarially equivalent value of a
         participant's benefit, the mortality factors shall be those set forth
         in the unisex table (50% male/50% female) described in Revenue Ruling
         2001-62."

                  9. By substituting the following for the third paragraph of
Step 2 of subparagraph 2 of Paragraph A-8 of Exhibit/Supplement A to the plan,
effective January 1, 2003:

                           "If the age at which the benefit is payable is less
                           than 62, the age-adjusted dollar limit is determined
                           by reducing the age-adjusted dollar limit at age 62
                           on an actuarially equivalent basis. In general, Code
                           Section 415(b)(2)(E)(ii) and (v) require that the
                           reduced age-adjusted dollar limit be the lesser of
                           the equivalent amount computed using the plan rate
                           and plan mortality table (or plan tabular factor)
                           used for actuarial equivalence for early retirement
                           benefits under the plan and the amount computed using
                           5 percent interest and the applicable mortality table
                           prescribed under Revenue Ruling 2001-62 (used to the
                           extent described in Q&A-6 of Revenue Ruling 98-1
                           which provides that for purposes of adjusting any
                           limitation under Code Section 415(b)(2)(C) or (D), to
                           the extent a forfeiture does not occur upon death,
                           the mortality decrement may be ignored prior to age
                           62 and must be ignored after Social Security
                           Retirement Age)."


                  IN WITNESS WHEREOF, the company has caused these presents to
be signed by its officer thereunto duly authorized this 22nd day of August,
2002.

                                           USG CORPORATION

                                           By:
                                               --------------------------------
                                               Vice President, Compensation,
                                               Benefits And Administration


                                       95