Document:

EXHIBIT 10.1

                   RESIDENTIAL ASSET MORTGAGE PRODUCTS, INC.,

                                  as Purchaser,

                           GMAC MORTGAGE CORPORATION,

                             as Seller and Servicer,

                    WALNUT GROVE MORTGAGE LOAN TRUST 2001-A,

                                   as Seller,

                     GMACM HOME EQUITY LOAN TRUST 2002-HE1,

                                   as Issuer,

                                       and

                        WELLS FARGO BANK MINNESOTA, N.A.,

                              as Indenture Trustee

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

                        MORTGAGE LOAN PURCHASE AGREEMENT
                  --------------------------------------------

                           Dated as of March 27, 2002

<PAGE>

<TABLE>
<CAPTION>

                                TABLE OF CONTENTS

                                                                                            PAGE

<S>                                                                                        <C>
ARTICLE I         DEFINITIONS...............................................................2

        Section 1.1      Definitions........................................................2

        Section 1.2      Other Definitional Provisions......................................2

ARTICLE II        SALE OF MORTGAGE LOANS AND RELATED PROVISIONS.............................3

        Section 2.1      Sale of Initial Mortgage Loans.....................................3

        Section 2.2      Sale of Subsequent Mortgage Loans..................................5

        Section 2.3      Payment of Purchase Price..........................................9

        Section 2.4      [Reserved]........................................................10

        Section 2.5      Draws During Rapid Amortization Period............................10

ARTICLE III       REPRESENTATIONS AND WARRANTIES; REMEDIES FOR BREACH......................11

        Section 3.1      Representations and Warranties....................................11

ARTICLE IV        SELLERS' COVENANTS.......................................................20

        Section 4.1      Covenants of the Sellers..........................................20

ARTICLE V         SERVICING................................................................20

        Section 5.1      Servicing.........................................................20

ARTICLE VI        INDEMNIFICATION BY THE SELLERS WITH RESPECT TO THE MORTGAGE LOANS........21

        Section 6.1      Limitation on Liability of the Sellers............................21

ARTICLE VII       TERMINATION..............................................................21

        Section 7.1      Termination.......................................................21

ARTICLE VIII      MISCELLANEOUS PROVISIONS.................................................21

        Section 8.1      Amendment.........................................................21

        Section 8.2      Governing Law.....................................................21

        Section 8.3      Notices...........................................................21

        Section 8.4      Severability of Provisions........................................22

        Section 8.5      Relationship of Parties...........................................23

        Section 8.6      Counterparts......................................................23

        Section 8.7      Further Agreements................................................23

        Section 8.8      Intention of the Parties..........................................23

        Section 8.9      Successors and Assigns; Assignment of this Agreement..............23

        Section 8.10     Survival..........................................................24

                                        i

<PAGE>

        Section 8.11     Third Party Beneficiary...........................................24

EXHIBIT 1  MORTGAGE LOAN SCHEDULE

EXHIBIT 2  FORM OF SUBSEQUENT TRANSFER AGREEMENT

EXHIBIT 3  FORM OF ADDITION NOTICE
</TABLE>

                                        ii

<PAGE>

        This Mortgage Loan Purchase  Agreement  (the  "Agreement"),  dated as of
March 27, 2002, is made among GMAC Mortgage Corporation, as seller ("GMACM") and
as servicer (in such capacity, the "Servicer"), Walnut Grove Mortgage Loan Trust
2001-A, as seller ("WG Trust 2001" and, together with GMACM, each a "Seller" and
collectively,  the "Sellers"),  Residential  Asset Mortgage  Products,  Inc., as
purchaser (the  "Purchaser"),  GMACM Home Equity Loan Trust 2002-HE1,  as issuer
(the "Issuer"), and Wells Fargo Bank Minnesota,  N.A., as indenture trustee (the
"Indenture Trustee").

                                   WITNESSETH:

        WHEREAS,  GMACM,  in the ordinary  course of its  business  acquires and
originates  home equity loans and acquired or originated  all of the home equity
loans listed on the  Mortgage  Loan  Schedule  attached as Exhibit 1 hereto (the
"Initial Mortgage Loans");

        WHEREAS,  GMACM sold a portion of the  Initial  Mortgage  Loans (the "WG
Trust  2001  Initial  Mortgage  Loans")  and  intends  to sell a portion  of the
Subsequent Mortgage Loans to be sold by WG Trust 2001 hereunder, to Walnut Grove
Funding,  Inc. ("Walnut Grove"),  pursuant to a Mortgage Loan Purchase Agreement
(the "Walnut Grove  Purchase  Agreement"),  dated as of May 1, 2001, as amended,
among Walnut Grove, as purchaser, GMACM, as seller, WG Trust 2001, as Issuer and
Bank One, National Association, as trustee (each date of sale, a "Prior Transfer
Date");

        WHEREAS,  Walnut Grove sold the WG Trust 2001 Initial  Mortgage Loans to
WG Trust 2001 pursuant to a Trust  Agreement,  dated as of May 1, 2001,  between
Walnut Grove, as depositor and Wilmington Trust Company, as owner trustee;

        WHEREAS,  GMACM owns the Cut-Off Date Principal Balances and the Related
Documents for the portion of Initial  Mortgage Loans  identified on the Mortgage
Loan  Schedule -A attached  as Exhibit 1-A hereto (the "GMACM  Initial  Mortgage
Loans"), including rights to (a) any property acquired by foreclosure or deed in
lieu of foreclosure or otherwise, and (b) the proceeds of any insurance policies
covering the GMACM Initial Mortgage Loans;

        WHEREAS,  WG Trust 2001 owns the Cut-Off Date Principal Balances and the
Related Documents for the WG Trust 2001 Initial Mortgage Loans identified on the
Mortgage  Loan Schedule -B attached as Exhibit 1-B hereto,  including  rights to
(a) any  property  acquired by  foreclosure  or deed in lieu of  foreclosure  or
otherwise,  and (b) the proceeds of any insurance policies covering the WG Trust
Initial Mortgage Loans;

        WHEREAS, the parties hereto desire that: (i) GMACM sell the Cut-Off Date
Principal  Balances of the GMACM Initial  Mortgage Loans to the Purchaser on the
Closing Date pursuant to the terms of this  Agreement  together with the Related
Documents,  and thereafter all Additional Balances relating to the GMACM Initial
Mortgage  Loans  created  on or after  the  Cut-Off  Date and prior to the Rapid
Amortization Period, (ii) WG Trust 2001 sell the Cut-Off Date Principal Balances
of the WG Trust  Initial  Mortgage  Loans to the  Purchaser  on the Closing Date
pursuant to the terms of this Agreement together with the Related Documents, and
thereafter all  Additional  Balances  relating to the WG Trust Initial  Mortgage
Loans  created on or after the Cut-Off Date and prior to the Rapid  Amortization
Period,  (iii) the Sellers may sell  Subsequent  Mortgage Loans to the Issuer on
one or more  Subsequent  Transfer  Dates  pursuant  to the terms of the  related
Subsequent  Transfer  Agreement,  and (iv) the  related  Seller  and GMACM  make
certain  representations  and  warranties  on  the  Closing  Date  and  on  each
Subsequent Transfer Date;

                                       1
<PAGE>

        WHEREAS,  pursuant to the Trust  Agreement,  the Purchaser will sell the
Initial  Mortgage  Loans and transfer all of its rights under this  Agreement to
the Issuer on the Closing Date;

     WHEREAS,  pursuant to the terms of the  Servicing  Agreement,  the Servicer
will service the Mortgage Loans;

     WHEREAS,  pursuant  to the terms of the Trust  Agreement,  the Issuer  will
issue the Certificates;

     WHEREAS,  pursuant to the terms of the Indenture, the Issuer will issue the
Notes, secured by the Trust Estate;

        NOW,  THEREFORE,   in  consideration  of  the  mutual  covenants  herein
contained, the parties hereto agree as follows:

                                   ARTICLE I

                                   DEFINITIONS

Section 1.1 Definitions. For all purposes of this Agreement, except as otherwise
expressly provided herein or unless the context otherwise requires,  capitalized
terms not  otherwise  defined  herein shall have the  meanings  assigned to such
terms in the  Definitions  contained in Appendix A to the indenture  dated as of
March 27, 2002 (the "Indenture"),  between the Issuer and the Indenture Trustee,
which is  incorporated by reference  herein.  All other  capitalized  terms used
herein shall have the meanings specified herein.

Section 1.2 Other Definitional  Provisions.  All terms defined in this Agreement
shall have the defined  meanings when used in any  certificate or other document
made or delivered pursuant hereto unless otherwise defined therein.

        As used in this Agreement and in any  certificate or other document made
or delivered  pursuant hereto or thereto,  accounting  terms not defined in this
Agreement or in any such  certificate or other  document,  and accounting  terms
partly defined in this Agreement or in any such  certificate or other  document,
to the extent not  defined,  shall have the  respective  meanings  given to them
under  generally  accepted  accounting  principles.   To  the  extent  that  the
definitions of accounting  terms in this Agreement or in any such certificate or
other document are inconsistent  with the meanings of such terms under generally
accepted accounting  principles,  the definitions contained in this Agreement or
in any such certificate or other document shall control.

        The words  "hereof,"  "herein,"  "hereunder" and words of similar import
when used in this Agreement  shall refer to this Agreement as a whole and not to
any  particular  provision  of this  Agreement;  Section and Exhibit  references
contained in this  Agreement  are  references  to Sections and Exhibits in or to

                                       2
<PAGE>

this Agreement  unless  otherwise  specified;  the term  "including"  shall mean
"including  without  limitation";  "or"  shall  include  "and/or";  and the term
"proceeds" shall have the meaning ascribed thereto in the UCC.

        The  definitions  contained  in this  Agreement  are  applicable  to the
singular as well as the plural forms of such terms and to the  masculine as well
as the feminine and neuter genders of such terms.

        Any agreement, instrument or statute defined or referred to herein or in
any  instrument  or  certificate  delivered in  connection  herewith  means such
agreement,  instrument  or statute  as from time to time  amended,  modified  or
supplemented and includes (in the case of agreements or instruments)  references
to all attachments thereto and instruments incorporated therein; references to a
Person are also to its permitted successors and assigns.

                                   ARTICLE II

                  SALE OF MORTGAGE LOANS AND RELATED PROVISIONS

Section 2.1    Sale of Initial Mortgage Loans.
               ------------------------------

(a) GMACM,  by the execution and delivery of this  Agreement,  does hereby sell,
assign, set over, and otherwise convey to the Purchaser,  without recourse,  all
of its  right,  title and  interest  in, to and  under the  following,  wherever
located:  (i) the GMACM  Initial  Mortgage  Loans  (including  the Cut-Off  Date
Principal Balances now existing and all Additional  Balances  thereafter arising
thereunder to and including the date  immediately  preceding the commencement of
the Rapid  Amortization  Period relating thereto;  provided,  however,  that any
Principal  Balance  represented  by a Draw made  during  the Rapid  Amortization
Period and  interest  thereon and money due or to become due in respect  thereof
will not be or  deemed to be  transferred  to the  Purchaser,  and GMACM in such
event shall retain ownership of each Principal Balance  represented by each such
Draw and  interest  thereon and money due or to become due in respect  thereof),
all interest accruing thereon,  all monies due or to become due thereon, and all
collections in respect thereof received on or after the Cut-Off Date (other than
interest  thereon in respect of any period prior to the Cut-Off Date);  (ii) the
interest  of GMACM in any  insurance  policies  in respect of the GMACM  Initial
Mortgage Loans; and (iii) all proceeds of the foregoing; provided, however, that
the Purchaser does not assume the obligation under each Loan Agreement  relating
to a Mortgage Loan to fund Draws to the Mortgagor thereunder,  and the Purchaser
shall not be obligated or permitted to fund any such Draws, it being agreed that
GMACM will retain the obligation to fund future Draws.  Such conveyance shall be
deemed to be made: (1) with respect to the Cut-Off Date Principal  Balances,  as
of the  Closing  Date;  and (2) with  respect to the  amount of each  Additional
Balance  created on or after the Cut-Off Date and prior to the  commencement  of
the Rapid Amortization  Period, as of the later of the Closing Date and the date
that the  corresponding  Draw was made  pursuant to the related Loan  Agreement,
subject to the receipt by GMACM of  consideration  therefor  as provided  herein
under clause (a) of Section 2.3.

(b) WG Trust 2001, by the execution and delivery of this Agreement,  does hereby
sell, assign, set over, and otherwise convey to the Purchaser, without recourse,
all of its  right,  title and  interest  in, to and  under  the  following,  and
wherever located: (i) the WG Trust Initial Mortgage Loans (including the Cut-Off
Date  Principal  Balances now existing and its rights to acquire all  Additional

                                       3
<PAGE>

Balances  and  Excluded  Amounts  thereafter  arising  thereunder,  all interest
accruing thereon,  all monies due or to become due thereon,  and all collections
in respect  thereof  received on or after the Cut-Off Date (other than  interest
thereon in respect of any period prior to the Cut-Off Date));  (ii) the interest
of WG Trust 2001 in any  insurance  policies in respect of the WG Trust  Initial
Mortgage Loans; and (iii) all proceeds of the foregoing; provided, however, that
the Purchaser does not assume the obligation under each Loan Agreement  relating
to a Mortgage Loan to fund Draws to the Mortgagor thereunder,  and the Purchaser
shall not be obligated or permitted to fund any such Draws, it being agreed that
GMACM will retain the  obligation  to fund future  Draws  pursuant to the Walnut
Grove Purchase  Agreement.  Such conveyance shall be deemed to be made: (1) with
respect to the Cut-Off Date Principal Balances,  as of the Closing Date; and (2)
with respect to the amount of each  Additional  Balance  created on or after the
Cut-Off Date and prior to the commencement of the Rapid Amortization  Period, as
of the later of the Closing  Date and the date that the  corresponding  Draw was
made pursuant to the related Loan Agreement,  subject to the receipt by GMACM of
consideration therefor as provided herein under clause (a) of Section 2.3

        In addition,  the Issuer shall deposit with the  Indenture  Trustee from
proceeds of the issuance of the  Securities on the Closing Date (i) the Original
Pre-Funded  Amount for deposit in the Pre-Funding  Account and (ii) the Interest
Coverage Amount for deposit in the Capitalized Interest Account.

(c) In connection  with the  conveyance  by GMACM of the GMACM Initial  Mortgage
Loans and any  Subsequent  Mortgage  Loans,  GMACM  further  agrees,  at its own
expense,  on or prior to the Closing Date with respect to the Principal Balances
of the GMACM Initial  Mortgage  Loans and on or prior to the related  Subsequent
Cut-Off  Date in the  case of such  Subsequent  Mortgage  Loans  sold by it,  to
indicate in its books and records  that the GMACM  Initial  Mortgage  Loans have
been sold to the Purchaser  pursuant to this Agreement,  and, in the case of the
Subsequent  Mortgage  Loans,  to the Issuer  pursuant to the related  Subsequent
Transfer  Agreement,  and to deliver to the Purchaser true and complete lists of
all of the Mortgage  Loans sold by GMACM  specifying  for each Mortgage Loan (i)
its account  number and (ii) its Cut-Off Date  Principal  Balance or  Subsequent
Cut-Off Date  Principal  Balance.  The Mortgage  Loan Schedule  indicating  such
information  with respect to the Mortgage Loans sold by GMACM shall be marked as
Exhibit 1-A to this Agreement and is hereby incorporated into and made a part of
this Agreement.

(d) In connection  with the  conveyance by WG Trust 2001 of the WG Trust Initial
Mortgage Loans and any Subsequent  Mortgage Loans, WG Trust 2001 further agrees,
at its own  expense,  on or  prior  to the  Closing  Date  with  respect  to the
Principal Balances of the WG Trust Initial Mortgage Loans and on or prior to the
related  Subsequent  Cut-Off Date in the case of such Subsequent  Mortgage Loans
sold by it,  to  indicate  in its books and  records  that the WG Trust  Initial
Mortgage Loans have been sold to the Purchaser pursuant to this Agreement,  and,
in the case of the  Subsequent  Mortgage  Loans,  to the Issuer  pursuant to the
related Subsequent Transfer Agreement.  GMACM, as Servicer of the Mortgage Loans
sold by WG Trust  2001,  agrees to deliver to the  Purchaser  true and  complete
lists of all of the  Mortgage  Loans sold by WG Trust 2001  specifying  for each
Mortgage Loan (i) its account number and (ii) its Cut-Off Date Principal Balance
or  Subsequent  Cut-Off  Date  Principal  Balance.  The Mortgage  Loan  Schedule
indicating such  information with respect to the Mortgage Loans sold by WG Trust
2001 shall be marked as Exhibit 1-B to this Agreement and is hereby incorporated
into and made a part of this Agreement.

                                       4
<PAGE>

(e) In connection  with the  conveyance  by GMACM of the GMACM Initial  Mortgage
Loans and any  Subsequent  Mortgage  Loans sold by it and the  conveyance  by WG
Trust 2001 of the WG Trust Initial  Mortgage Loans and any  Subsequent  Mortgage
Loans sold by it, GMACM shall,  (A) with respect to each related  Mortgage Loan,
on behalf of the Purchaser deliver to, and deposit with the Custodian,  at least
five (5)  Business  Days  before  the  Closing  Date in the  case of an  Initial
Mortgage  Loan,  and, on behalf of the Issuer,  three (3) Business Days prior to
the related Subsequent  Transfer Date in the case of a Subsequent Mortgage Loan,
the  original  Loan  Agreement  endorsed or assigned  without  recourse in blank
(which  endorsement  shall contain  either an original  signature or a facsimile
signature  of an  authorized  officer of GMACM or GMAC Bank) or, with respect to
any Mortgage Loan as to which the original Loan  Agreement has been  permanently
lost or destroyed  and has not been  replaced,  a Lost Note  Affidavit,  and any
modification  agreement  or amendment  to such  Mortgage  Note and (B) except as
provided in clause (A) with respect to the Loan Agreements, deliver the Mortgage
Files to the Servicer.

        Within the time period for the review of each Loan  Agreement  set forth
in Section  2.2 of the  Custodial  Agreement,  if a material  defect in any Loan
Agreement is discovered  which may materially and adversely  affect the value of
the related Mortgage Loan, or the interests of the Indenture Trustee (as pledgee
of the Mortgage Loans), the Noteholders,  the Certificateholders or the Enhancer
in such Mortgage Loan,  including  GMACM's failure to deliver the Loan Agreement
to the  Custodian  on behalf of the  Indenture  Trustee,  GMACM  shall cure such
defect,  repurchase  the  related  Mortgage  Loan  at the  Repurchase  Price  or
substitute  an  Eligible  Substitute  Loan  therefor  upon  the same  terms  and
conditions set forth in Section 3.1 hereof for breaches of  representations  and
warranties  as to  the  Mortgage  Loans.  If a  material  defect  in  any of the
documents in the  Mortgage  File held by the  Servicer is  discovered  which may
materially and adversely  affect the value of the related  Mortgage Loan, or the
interests  of the  Indenture  Trustee (as pledgee of the  Mortgage  Loans),  the
Noteholders,  the  Certificateholders  or the  Enhancer in such  Mortgage  Loan,
including GMACM's failure to deliver such documents to the Servicer on behalf of
the  Indenture  Trustee,  GMACM shall cure such defect,  repurchase  the related
Mortgage Loan at the Repurchase Price or substitute an Eligible  Substitute Loan
therefor upon the same terms and  conditions set forth in Section 3.1 hereof for
breaches of representations and warranties as to the Mortgage Loans.

        Upon sale of the Initial  Mortgage  Loans,  the  ownership  of each Loan
Agreement,  each related  Mortgage and the contents of the related Mortgage File
shall be vested in the  Purchaser and the ownership of all records and documents
with  respect to the Initial  Mortgage  Loans that are  prepared by or that come
into the possession of either Seller,  as a seller of the Initial Mortgage Loans
hereunder or by GMACM in its capacity as Servicer under the Servicing  Agreement
shall immediately vest in the Purchaser,  and shall be promptly delivered to the
Servicer  in the  case of the  documents  in  possession  of WG  Trust  2001 and
retained and  maintained in trust by GMACM as the Servicer  (except for the Loan
Agreements,  which  shall  be  retained  by the  Custodian)  at the  will of the
Purchaser,   in  such  custodial  capacity  only.  Each  Seller's  records  will
accurately  reflect  the sale of each  Initial  Mortgage  Loan sold by it to the
Purchaser.

                                       5
<PAGE>

        The Purchaser hereby acknowledges its acceptance of all right, title and
interest to the property conveyed to it pursuant to this Section 2.1.

(f) The parties hereto intend that the transactions set forth herein  constitute
a sale by the Sellers to the Purchaser of each of the Sellers' right,  title and
interest in and to their respective Initial Mortgage Loans and other property as
and to the  extent  described  above.  In the event the  transactions  set forth
herein are deemed not to be a sale, each Seller hereby grants to the Purchaser a
security  interest in all of such Seller's right,  title and interest in, to and
under all  accounts,  chattel  papers,  general  intangibles,  contract  rights,
payment  intangibles,  certificates of deposit,  deposit accounts,  instruments,
documents,  letters of credit,  money,  advices of credit,  investment property,
goods and other property  consisting of, arising under or related to the Initial
Mortgage  Loans  and  such  other  property,  to  secure  all of  such  Seller's
obligations  hereunder,  and this Agreement  shall and hereby does  constitute a
security  agreement under applicable law. Each Seller agrees to take or cause to
be  taken  such  actions  and  to  execute  such  documents,  including  without
limitation the filing of any  continuation  statements with respect to the UCC-1
financing  statements  filed with respect to the Initial  Mortgage  Loans by the
Purchaser on the Closing Date, and any amendments  thereto required to reflect a
change in the name or  corporate  structure  of such Seller or the filing of any
additional UCC-1 financing  statements due to the change in the principal office
or jurisdiction of incorporation of such Seller, as are necessary to perfect and
protect the  Purchaser's and its assignees'  interests in each Initial  Mortgage
Loan and the proceeds  thereof.  The Servicer  shall file any such  continuation
statements on a timely basis.

(g) In connection  with the  assignment  of any Mortgage Loan  registered on the
MERS(R) System, GMACM further agrees that it will cause, at GMACM's own expense,
as soon as  practicable  after the Closing Date,  the MERS(R) System to indicate
that such Mortgage  Loan has been assigned by GMACM to the Indenture  Trustee in
accordance  with this  Agreement or the Trust  Agreement  for the benefit of the
Noteholders  by including (or deleting,  in the case of Mortgage Loans which are
repurchased  in accordance  with this  Agreement) in such computer files (a) the
code "[IDENTIFY  INDENTURE  TRUSTEE  SPECIFIC CODE]" in the field "[IDENTIFY THE
FIELD NAME FOR INDENTURE  TRUSTEE]" which  identifies the Indenture  Trustee and
(b) the code "[IDENTIFY  SERIES SPECIFIC CODE NUMBER]" in the field "Pool Field"
which identifies the series of the Notes issued in connection with such Mortgage
Loans.  GMACM  agrees  that it will  not  alter  the  codes  referenced  in this
paragraph  with respect to any Mortgage  Loan during the term of this  Agreement
unless and until such Mortgage Loan is repurchased in accordance  with the terms
of this Agreement.

Section 2.2    Sale of Subsequent Mortgage Loans.
               ---------------------------------

(a) Subject to the  conditions  set forth in  paragraphs  (b) and (c) below (the
satisfaction of which (other than the conditions specified in paragraphs (b)(i),
(b)(ii) and (b)(iii))  shall be evidenced by an Officer's  Certificate  of GMACM
dated the date of the related Subsequent Transfer Date), in consideration of the
Issuer's  payment of the  purchase  price  provided for in Section 2.3 on one or
more  Subsequent  Transfer  Dates  using  amounts on deposit in the  Pre-Funding
Account,  the  Custodial  Account  (to the  extent  permitted  by the  Servicing
Agreement) or the Funding  Account,  each Seller may, on the related  Subsequent
Transfer Date, sell,  transfer,  assign, set over and convey without recourse to

                                       6
<PAGE>

the Issuer but subject to the other terms and  provisions of this  Agreement all
of the  right,  title  and  interest  of such  Seller  in and to (i)  Subsequent
Mortgage Loans identified on the related Mortgage Loan Schedule  attached to the
related  Subsequent  Transfer  Agreement  delivered by GMACM on such  Subsequent
Transfer Date  (including  the Subsequent  Cut-Off Date  Principal  Balance then
existing and all Additional  Balances and Excluded  Amounts  thereafter  arising
thereunder to and including the date  immediately  preceding the commencement of
the Rapid  Amortization  Period);  provided that  Excluded  Amounts shall not be
conveyed to the Issuer and shall be retained by GMACM,  (ii) all money due or to
become due on such Subsequent  Mortgage Loan and all collections  received on or
after the related  Subsequent  Cut-Off  Date and (iii) all items with respect to
such Subsequent Mortgage Loans to be delivered pursuant to Section 2.1 above and
the other items in the  related  Mortgage  Files;  provided,  however,  that the
Seller of a Subsequent  Mortgage Loan reserves and retains all right,  title and
interest in and to principal  received and interest  accruing on such Subsequent
Mortgage Loan prior to the related  Subsequent Cut-Off Date. Any transfer to the
Issuer  by a Seller of  Subsequent  Mortgage  Loans  shall be  absolute,  and is
intended by the Issuer and such Seller to constitute and to be treated as a sale
of such  Subsequent  Mortgage  Loans by such Seller to the Issuer.  In the event
that any such  transaction  is deemed not to be a sale,  GMACM and WG Trust 2001
hereby  grant to the  Issuer  as of each  Subsequent  Transfer  Date a  security
interest in all of GMACM's or WG Trust 2001's, as applicable,  right,  title and
interest in, to and under all accounts,  chattel  papers,  general  intangibles,
payment intangibles, contract rights, certificates of deposit, deposit accounts,
instruments,  documents, letters of credit, money, advices of credit, investment
property,  goods and other  property  consisting of, arising under or related to
the related Subsequent Mortgage Loans and such other property,  to secure all of
GMACM's or WG Trust  2001's  obligations  hereunder,  and this  Agreement  shall
constitute a security agreement under applicable law. Each Seller agrees to take
or cause to be taken such actions and to execute such  documents,  including the
filing  of all  necessary  UCC-1  financing  statements  filed  in the  State of
Delaware and the  Commonwealth  of  Pennsylvania  (which shall be submitted  for
filing as of the related Subsequent Transfer Date), any continuation  statements
with respect thereto and any amendments  thereto required to reflect a change in
the name or corporate  structure of such Seller or the filing of any  additional
UCC-1  financing  statements  due  to the  change  in the  principal  office  or
jurisdiction of  incorporation  of such Seller,  as are necessary to perfect and
protect  the  interests  of the  Issuer  and its  assignees  in each  Subsequent
Mortgage  Loan  and the  proceeds  thereof.  The  Servicer  shall  file any such
continuation statements on a timely basis.

        The  Issuer on each  Subsequent  Transfer  Date  shall  acknowledge  its
acceptance of all right, title and interest to the related  Subsequent  Mortgage
Loans  and  other  property,  existing  on  the  Subsequent  Transfer  Date  and
thereafter created, conveyed to it pursuant to this Section 2.2.

        The Issuer shall be entitled to all scheduled  principal payments due on
and after each Subsequent  Cut-Off Date, all other payments of principal due and
collected  on and after  each  Subsequent  Cut-Off  Date,  and all  payments  of
interest on any related  Subsequent  Mortgage  Loans,  minus that portion of any
such  interest  payment  that is  allocable  to the period  prior to the related
Subsequent  Cut-Off  Date and any payment  relating to any  Excluded  Amounts as
provided in Section 2.5.

                                       7
<PAGE>

(b) Either Seller may transfer to the Issuer  Subsequent  Mortgage Loans and the
other  property and rights  related  thereto  described in Section  2.2(a) above
during the Pre-Funding  Period,  and the Issuer shall cause to be released funds
from the Pre-Funding Account or during the Revolving Period, upon the release of
funds on deposit in the Custodial Account or the Funding Account,  respectively,
in accordance with the Servicing  Agreement,  only upon the satisfaction of each
of the following conditions on or prior to the related Subsequent Transfer Date:

(i) such  Seller or GMACM,  as  Servicer,  shall  have  provided  the  Indenture
Trustee,  the Rating  Agencies and the Enhancer  with a timely  Addition  Notice
substantially  in the form of Exhibit 3,  which  notice  shall be given no later
than seven  Business Days prior to the related  Subsequent  Transfer  Date,  and
shall  designate the  Subsequent  Mortgage  Loans to be sold to the Issuer,  the
aggregate  Principal Balance of such Subsequent Mortgage Loans as of the related
Subsequent  Cut-Off Date and any other information  reasonably  requested by the
Indenture  Trustee or the  Enhancer  with  respect to such  Subsequent  Mortgage
Loans;

(ii) such Seller shall have delivered to the Indenture  Trustee and the Enhancer
a duly  executed  Subsequent  Transfer  Agreement  substantially  in the form of
Exhibit 2, (A)  confirming  the  satisfaction  of each  condition  precedent and
representations  specified in this Section  2.2(b) and in Section  2.2(c) and in
the related  Subsequent  Transfer  Agreement  and (B)  including a Mortgage Loan
Schedule listing the Subsequent Mortgage Loans;

(iii) as of each  Subsequent  Transfer  Date,  as  evidenced  by delivery to the
Indenture Trustee of the Subsequent Transfer Agreement in the form of Exhibit 2,
the respective Seller shall not be insolvent, made insolvent by such transfer or
aware of any pending insolvency;

(iv)  such  sale and  transfer  shall  not  result  in a  material  adverse  tax
consequence  to the Issuer or, due to any action or  inaction on the part of the
respective Seller to the Securityholders or the Enhancer;

(v)     the Revolving Period shall not have terminated; and

(vi) the Enhancer shall have approved the sale of the Subsequent  Mortgage Loans
(which  approval shall not be  unreasonably  withheld)  within five (5) Business
Days of receipt of an electronic file  containing the information  regarding the
Subsequent  Mortgage  Loans  that was  delivered  to the  Enhancer  prior to the
Closing Date with respect to the Initial Mortgage Loans;  provided,  that if the
Enhancer shall not have notified the respective Seller or GMACM within such five
(5) Business Days that the Enhancer does not so approve, such sale of Subsequent
Mortgage Loans shall be deemed approved by the Enhancer.

                                       8
<PAGE>

        In addition,  GMACM shall have  delivered to the Issuer,  the  Indenture
Trustee  and the  Enhancer  an  Opinion  of  Counsel  with  respect  to  certain
bankruptcy matters relating to the transfers of Subsequent Mortgage Loans, which
Opinion of Counsel shall be  substantially in the form of the Opinion of Counsel
delivered to the Enhancer and the Rating  Agencies and the Indenture  Trustee on
the Closing Date regarding certain bankruptcy matters,  within 30 days after the
end  of  the  Pre-Funding  Period  relating  to all  Subsequent  Mortgage  Loans
transferred to the Trust during the Pre-Funding Period, and within 30 days after
the end of the  Revolving  Period,  relating to all  Subsequent  Mortgage  Loans
transferred  to the Trust during the  Revolving  Period,  other than  Subsequent
Mortgage Loans purchased from funds on deposit in the Pre-Funding Account.

        The  obligation of the Issuer to purchase a Subsequent  Mortgage Loan on
any Subsequent  Transfer Date is subject to the following  conditions:  (i) each
such Subsequent  Mortgage Loan must satisfy the  representations  and warranties
specified in the related Subsequent Transfer Agreement and this Agreement;  (ii)
neither Seller has selected such  Subsequent  Mortgage Loans in a manner that it
reasonably  believes  is  adverse to the  interests  of the  Noteholders  or the
Enhancer;  (iii) GMACM will deliver to the Enhancer  and the  Indenture  Trustee
certain  Opinions of Counsel  described in Section  2.2(b) and acceptable to the
Enhancer  and the  Indenture  Trustee  with  respect to the  conveyance  of such
Subsequent  Mortgage Loans; and (iv) as of the related  Subsequent  Cut-Off Date
each  Subsequent  Mortgage  Loan will satisfy the following  criteria:  (A) such
Subsequent Mortgage Loan may not be 30 or more days contractually  delinquent as
of the related Subsequent Cut-Off Date; (B) the original stated term to maturity
of such Subsequent Mortgage Loan will not exceed 360 months; (C) such Subsequent
Mortgage Loan must have an outstanding  Principal Balance of at least $1,000 and
not more than  $750,000  as of the related  Subsequent  Cut-Off  Date;  (D) such
Subsequent  Mortgage Loan will be underwritten  substantially in accordance with
the criteria set forth under  "Description of the Mortgage Loans -- Underwriting
Standards" in the Prospectus Supplement;  (E) such Subsequent Mortgage Loan must
have a CLTV at  origination  of no more than 100.00%;  (F) the remaining term to
stated  maturity  of such  Subsequent  Mortgage  Loan must be no later  than 360
months;  (G) such  Subsequent  Mortgage  Loan  shall not  provide  for  negative
amortization;  and (H) following the purchase of such Subsequent  Mortgage Loans
by the Issuer,  the  Mortgage  Loans  included  in the Trust  Estate must have a
weighted average  interest rate, a weighted  average  remaining term to maturity
and a weighted average CLTV at origination,  as of each Subsequent Cut-Off Date,
that does not vary materially from the Initial Mortgage Loans included initially
in the  Trust  Estate,  and the  percentage  of  Mortgage  Loans  (by  aggregate
principal  balance)  that are secured by second  liens on the related  Mortgaged
Properties  shall be no greater than the percentage of Initial  Mortgage  Loans.
Subsequent Mortgage Loans with characteristics materially varying from those set
forth above may be  purchased  by the Issuer and included in the Trust Estate if
they are  acceptable to the Enhancer,  in its reasonable  discretion;  provided,
however, that the addition of such Subsequent Mortgage Loans will not materially
affect the aggregate  characteristics of the Mortgage Loans in the Trust Estate.
Neither of the Sellers shall transfer  Subsequent Mortgage Loans with the intent
to mitigate losses on Mortgage Loans previously transferred. Upon the end of the
Revolving  Period,  the Enhancer may increase the  Overcollateralization  Amount
pursuant to Section 2.2(d) herein.

(c) Within five Business Days after each Subsequent  Transfer Date,  GMACM shall
deliver to the Rating Agencies, the Indenture Trustee and the Enhancer a copy of
the a  Mortgage  Loan  Schedule  reflecting  the  Subsequent  Mortgage  Loans in
electronic format.

(d) In the event that a mortgage  loan is not  acceptable  to the  Enhancer as a
Subsequent  Mortgage Loan pursuant to Section 2.2(b)(v) hereof, the Enhancer and
GMACM may mutually  agree to the transfer of such mortgage loan to the Issuer as
a Subsequent Mortgage Loan, subject to any increase in the Overcollateralization
Amount  that  may be  agreed  to by  GMACM  and  the  Enhancer  pursuant  to the
Indenture,  in which event GMACM shall  deliver to the Issuer and the  Indenture

                                       9
<PAGE>

Trustee, with a copy to the Enhancer,  an Officer's  Certificate  confirming the
agreement to the transfer of such  Subsequent  Mortgage Loan and  specifying the
amount of such increase in the  Overcollateralization  Amount,  which additional
Overcollateralization Amount may not be contributed by GMACM.

Section 2.3    Payment of Purchase Price.
               -------------------------

(a) The sale of the Initial Mortgage Loans shall take place on the Closing Date,
subject to and  simultaneously  with the deposit of the Initial  Mortgage  Loans
into the Trust  Estate,  the deposit of the Original  Pre-Funded  Amount and the
Interest  Coverage  Amount  into the  Pre-Funding  Account  and the  Capitalized
Interest Account, respectively, and the issuance of the Securities. The purchase
price (the "Purchase  Price") for the GMACM Initial Mortgage Loans to be paid by
the  Purchaser  to  GMACM  on the  Closing  Date  shall  be an  amount  equal to
$113,453,072.59 in immediately  available funds, together with the Certificates,
in respect of the Cut-Off Date Principal  Balances  thereof.  The Purchase Price
for the WG Trust Initial  Mortgage Loans to be paid by the Purchaser to WG Trust
2001 on the  Closing  Date  shall  be an  amount  equal  to  $187,022,200.37  in
immediately  available funds, in respect of the Cut-Off Date Principal  Balances
thereof.  The  Purchase  Price  paid  for any  Subsequent  Mortgage  Loan by the
Indenture  Trustee  from  funds on deposit in the  Pre-Funding  Account,  at the
direction of the Issuer,  shall be one-hundred  percent (100%) of the Subsequent
Cut-Off Date  Principal  Balance  thereof (as  identified  on the Mortgage  Loan
Schedule  attached  to the related  Subsequent  Transfer  Agreement  provided by
GMACM). In the case of each Additional Balance transferred  hereunder created on
or after  the  Cut-Off  Date (or the  Subsequent  Cut-Off  Date in the case of a
Subsequent   Mortgage  Loan)  and  prior  to  the   commencement  of  the  Rapid
Amortization Period, the Purchase Price thereof shall be the principal amount of
the related  Draw under the related  Loan  Agreement on the later of the Closing
Date  (or the  related  Subsequent  Transfer  Date in the  case of a  Subsequent
Mortgage Loan) and the date of the creation of such Additional Balance.

(b) In consideration of the sale of the GMACM Initial Mortgage Loans by GMACM to
the  Purchaser  on the Closing  Date,  the  Purchaser  shall pay to GMACM on the
Closing Date by wire transfer of immediately  available  funds to a bank account
designated by GMACM,  the amount  specified above in paragraph (a) for the GMACM
Initial  Mortgage  Loans;  provided,  that such  payment may be on a net funding
basis if agreed by GMACM and the Purchaser.  In consideration of the sale of any
Subsequent  Mortgage Loan by GMACM to the Issuer,  the Issuer shall pay to GMACM
by wire transfer of immediately  available funds to a bank account designated by
GMACM, the amount specified above in paragraph (a) for each Subsequent  Mortgage
Loan sold by GMACM.

(c) In  consideration  of the sale of the WG Trust Initial  Mortgage Loans by WG
Trust 2001 to the Purchaser on the Closing Date,  the Purchaser  shall pay to WG
Trust 2001 on the Closing Date by wire transfer of immediately  available  funds
to a bank account  designated by WG Trust 2001,  the amount  specified  above in
paragraph  (a) for the WG Trust  Initial  Mortgage  Loans;  provided,  that such
payment  may be on a net  funding  basis  if  agreed  by WG  Trust  2001 and the
Purchaser.  In consideration  of the sale of any Subsequent  Mortgage Loan by WG
Trust 2001 to the Issuer, the Issuer shall pay to WG Trust 2001 by wire transfer
of immediately  available  funds to a bank account  designated by WG Trust 2001,
the amount  specified above in paragraph (a) for each  Subsequent  Mortgage Loan
sold by WG Trust 2001.

                                       10
<PAGE>

(d) With respect to each Additional Balance  transferred  hereunder with respect
to any Initial Mortgage Loan or Subsequent Mortgage Loan, the Issuer as assignee
of the  Purchaser  shall  pay or cause to be paid to GMACM or its  designee  the
Purchase  Price  specified  above  for  such  Additional  Balance  in one of the
following ways, as applicable, a cash payment pursuant to Section 3.03(b) of the
Servicing  Agreement and Section 2.3(a) hereof in an amount equal to the related
Draw, if then available from Principal Collections during the related Collection
Period on the Mortgage Loans, or from funds on deposit in the Funding Account or
the Pre-Funding Account or from the Additional Balance Increase Amount.

Section 2.4    [Reserved].
               ----------

Section  2.5  Draws  During  Rapid   Amortization   Period.   During  the  Rapid
Amortization  Period,  any Draws made on the Mortgage Loans (each,  an "Excluded
Amount")  shall not be  Additional  Balances,  and the  ownership of the related
balances  shall be  retained  by GMACM.  On any  Payment  Date  during the Rapid
Amortization  Period,  with  respect  to  the  related  Collection  Period,  all
Collections  in respect of each  Mortgage  Loan shall be  allocated  pro rata as
between the Issuer and GMACM, based on the relative proportions of the Principal
Balance and the  Excluded  Amount  thereof,  respectively,  as of the end of the
calendar month  immediately  prior to such Collection  Period.  During the Rapid
Amortization  Period,  any losses incurred with respect to a Mortgage Loan shall
be  allocated  pro rata  between  the Issuer and GMACM,  based on the  Principal
Balance  and  the  Excluded  Amount  thereof,  respectively,  as of the  date of
liquidation of such Mortgage Loan. Notwithstanding any other provision hereof or
of the Servicing  Agreement,  payments and collections  allocable to an Excluded
Amount shall not be  deposited  into the  Custodial  Account,  the  Distribution
Account or the Note Payment Account, and shall be distributed by the Servicer to
GMACM no less frequently than monthly in accordance with reasonable instructions
provided by the Seller.

                                       11
<PAGE>

                                  ARTICLE III

                         REPRESENTATIONS AND WARRANTIES;

                               REMEDIES FOR BREACH

Section 3.1 Representations and Warranties. GMACM represents and warrants to the
Purchaser, as of the Closing Date and as of each Subsequent Transfer Date (or if
otherwise specified below, as of the date so specified):

        (a)    As to GMACM:

(i) GMACM is a corporation duly organized, validly existing and in good standing
under the laws of the  jurisdiction  governing its creation and existence and is
or will be in  compliance  with the laws of each  state in which  any  Mortgaged
Property is located to the extent necessary to ensure the enforceability of each
Mortgage Loan;

(ii) GMACM has the power and authority to make, execute, deliver and perform its
obligations under this Agreement and each Subsequent Transfer Agreement to which
it is a party and all of the transactions  contemplated under this Agreement and
each such Subsequent Transfer  Agreement,  and has taken all necessary corporate
action to authorize the  execution,  delivery and  performance of this Agreement
and each such Subsequent Transfer Agreement;

(iii) GMACM is not  required  to obtain the  consent of any other  Person or any
consents,  licenses,  approvals or  authorizations  from,  or  registrations  or
declarations  with, any governmental  authority,  bureau or agency in connection
with the execution,  delivery,  performance,  validity or enforceability of this
Agreement  or any  Subsequent  Transfer  Agreement,  except  for such  consents,
licenses,  approvals or  authorizations,  or registrations  or declarations,  as
shall have been obtained or filed, as the case may be;

(iv) The execution and delivery of this  Agreement and any  Subsequent  Transfer
Agreement by GMACM and its  performance  and  compliance  with the terms of this
Agreement and each such Subsequent  Transfer  Agreement will not violate GMACM's
Certificate of  Incorporation  or Bylaws or constitute a material default (or an
event which,  with notice or lapse of time, or both, would constitute a material
default)  under,  or result in the material  breach of, any  material  contract,
agreement  or  other  instrument  to which  GMACM  is a party  or  which  may be
applicable to GMACM or any of its assets;

(v) No litigation  before any court,  tribunal or governmental body is currently
pending, or to the knowledge of GMACM threatened,  against GMACM or with respect
to this  Agreement or any Subsequent  Transfer  Agreement that in the opinion of
GMACM has a reasonable  likelihood of resulting in a material  adverse effect on
the  transactions  contemplated  by this  Agreement or any  Subsequent  Transfer
Agreement;

(vi)    Reserved;

(vii) This  Agreement and each  Subsequent  Transfer  Agreement to which it is a
party,  constitutes a legal, valid and binding obligation of GMACM,  enforceable
against  GMACM in accordance  with its terms,  except as  enforceability  may be
limited by  applicable  bankruptcy,  insolvency,  reorganization,  moratorium or

                                       12
<PAGE>

other  similar laws now or  hereafter in effect  affecting  the  enforcement  of
creditors' rights in general and except as such enforceability may be limited by
general  principles of equity  (whether  considered in a proceeding at law or in
equity) or by public  policy with respect to  indemnification  under  applicable
securities laws;

(viii)  This  Agreement  constitutes  a valid  transfer  and  assignment  to the
Purchaser of all right,  title and interest of GMACM in and to the GMACM Initial
Mortgage Loans,  including the Cut-Off Date Principal  Balances now existing and
all Additional  Balances thereafter arising to and including the day immediately
preceding the Rapid  Amortization  Period,  all monies due or to become due with
respect thereto,  and all proceeds of such Cut-Off Date Principal  Balances with
respect to the GMACM Initial  Mortgage Loans; and this Agreement and the related
Subsequent Transfer Agreement,  when executed,  will constitute a valid transfer
and assignment to the Issuer of all right, title and interest of GMACM in and to
the related  Subsequent  Mortgage  Loans,  including the Cut-Off Date  Principal
Balances  existing on the related  Subsequent  Cut-Off Date and  thereafter  all
Additional  Balances arising to and including the day immediately  preceding the
Rapid Amortization Period, all monies due or to become due with respect thereto,
and all proceeds of such  Subsequent  Cut-Off Date  Principal  Balances and such
funds as are from time to time deposited in the Custodial Account (excluding any
investment  earnings  thereon)  as assets  of the  Trust and all other  property
specified in the  definition of "Trust" as being part of the corpus of the Trust
conveyed to the Purchaser by GMACM, and upon payment for the Additional Balances
with respect to any of the Mortgage Loans,  will constitute a valid transfer and
assignment  to the  Purchaser  (or the  Issuer  in the  case  of any  Additional
Balances relating to Subsequent Mortgage Loans) of all right, title and interest
of GMACM in and to the Additional Balances, all monies due or to become due with
respect  thereto,  and all  proceeds of such  Additional  Balances and all other
property  specified  in the  definition  of "Trust"  relating to the  Additional
Balances; and

(ix) GMACM is not in default with respect to any order or decree of any court or
any order, regulation or demand of any federal, state, municipal or governmental
agency,  which  default  might  have  consequences  that  would  materially  and
adversely  affect the condition  (financial or otherwise) or operations of GMACM
or its properties or might have  consequences  that would  materially  adversely
affect its performance hereunder;

        (b) As to each Initial  Mortgage  Loan  (except as  otherwise  specified
below) as of the Closing Date, or with respect to each Subsequent  Mortgage Loan
as of the  related  Subsequent  Transfer  Date  (except as  otherwise  specified
below):

(i) The information set forth in the Mortgage Loan Schedule with respect to each
Mortgage Loan or the Mortgage Loans is true and correct in all material respects
as of  the  date  or  dates  respecting  which  such  information  is  initially
furnished;

(ii)  With  respect  to each of the WG  Trust  Initial  Mortgage  Loans  or,  as
applicable,  any the Subsequent Mortgage Loans sold by WG Trust 2001, as of each
respective  Prior Transfer Date: (A) the related Loan Agreement and the Mortgage
had not been assigned or pledged,  except for any  assignment or pledge that has
been  satisfied and released,  (B)  immediately  prior to the assignment of such
Mortgage Loans to Walnut Grove, GMACM had good title thereto and (C) immediately
prior to such  assignment,  GMACM was the sole owner and holder of the  Mortgage

                                       13
<PAGE>

Loan free and clear of any and all liens,  encumbrances,  pledges,  or  security
interests  (other  than,  with  respect to any  Mortgage  Loan in a second  lien
position,  the lien of the related  first  mortgage)  of any nature and had full
right and  authority,  under  all  governmental  and  regulatory  bodies  having
jurisdiction  over the ownership of the  applicable  Mortgage  Loan, to sell and
assign the same pursuant to the Walnut Grove 2001 Purchase Agreement;

(iii) With respect to the GMACM Initial  Mortgage Loans or, as  applicable,  any
Subsequent  Mortgage  Loans  sold  by  GMACM  as of each  respective  Subsequent
Transfer  Date:  (A) the related Loan  Agreement  and the Mortgage have not been
assigned or pledged, except for any assignment or pledge that has been satisfied
and released,  (B) immediately  prior to the assignment of the Mortgage Loans to
the Purchaser(or to the Issuer in the case of the Subsequent Mortgage Loans sold
by  GMACM),  GMACM had good  title  thereto  and (C) GMACM is the sole owner and
holder of the Mortgage  Loan free and clear of any and all liens,  encumbrances,
pledges, or security interests (other than, with respect to any Mortgage Loan in
a second lien  position,  the lien of the related first  mortgage) of any nature
and has full right and authority,  under all governmental and regulatory  bodies
having  jurisdiction over the ownership of the applicable Mortgage Loans to sell
and  assign  the same  pursuant  to this  Agreement  or the  related  Subsequent
Transfer Agreement, as applicable;

(iv) To the best of  GMACM's  knowledge,  there is no valid  offset,  defense or
counterclaim of any obligor under any Loan Agreement or Mortgage;

(v) To the best of GMACM's knowledge,  there is no delinquent recording or other
tax or fee or assessment lien against any related Mortgaged Property;

(vi) To the  best of  GMACM's  knowledge,  there  is no  proceeding  pending  or
threatened  for the  total or  partial  condemnation  of the  related  Mortgaged
Property;

(vii) To the best of GMACM's knowledge, there are no mechanics' or similar liens
or claims  which  have been  filed for work,  labor or  material  affecting  the
related  Mortgaged  Property  which are,  or may be liens  prior or equal to, or
subordinate with, the lien of the related Mortgage, except liens which are fully
insured against by the title insurance policy referred to in clause (xi);

(viii) As of the Cut-Off Date or related  Subsequent  Cut-Off  Date, no Mortgage
Loan was 30 days or more delinquent in payment of principal or interest;

(ix) With respect to the GMACM Initial  Mortgage  Loans or, as  applicable,  any
Subsequent  Mortgage Loans sold by GMACM,  the related Mortgage File contains or
will contain, in accordance with the definition of "Mortgage File" in Appendix A
to the Indenture, each of the documents and instruments specified to be included
therein (it being  understood  that the Custodian  maintains the Loan  Agreement
related to each  Mortgage  File and the Servicer  maintains the remainder of the
items  to be  included  in the  Mortgage  File  pursuant  to the  terms  of this
Agreement);

                                       14
<PAGE>

(x) To the best of the GMACM's  knowledge,  the related Loan  Agreement  and the
related Mortgage at the time it was made complied in all material  respects with
applicable local, state and federal laws;

(xi) A title  search  or other  assurance  of title  customary  in the  relevant
jurisdiction was obtained with respect to each Mortgage Loan;

(xii)  None of the  Mortgaged  Properties  is a  mobile  home or a  manufactured
housing unit that is not permanently attached to its foundation;

(xiii) As of the Cut-Off Date, (a) no more than approximately  21.91% 15.51% and
8.35% of the Initial  Mortgage Loans, by Cut-Off Date Principal,  are secured by
Mortgaged   Properties  located  in  California,   Michigan  and  Massachusetts,
respectively. No more than approximately 7.08% of the Initial Mortgage Loans, by
Cut-Off Date Principal Balance,  are secured by Mortgaged  Properties located in
planned unit developments;

(xiv)  As  of  the  Cut-Off  Date  or  Subsequent  Cut-Off  Date,  the  Combined
Loan-to-Value Ratio for each Mortgage Loan was not in excess of 100.00%;

(xv) GMACM has not transferred the GMACM Initial Mortgage Loans to the Purchaser
or any Subsequent Mortgage Loans to the Issuer with any intent to hinder,  delay
or defraud any of its creditors;

(xvi) As of the  Cut-Off  Date,  no more than  approximately  70% of the Initial
Mortgage  Loans,  by Cut-Off Date  Principal  Balance,  are secured by Mortgaged
Properties which may have been appraised using a statistical property evaluation
method;

(xvii) The minimum monthly payment with respect to any Mortgage Loan is not less
than the  interest  accrued at the  applicable  Loan Rate on the  average  daily
Principal  Balance during the interest period relating to the date on which such
minimum monthly payment is due;

(xviii) Within a loan type, and except as required by applicable  law, each Loan
Agreement  and  each  Mortgage  is an  enforceable  obligation  of  the  related
Mortgagor;

(xix) To the best  knowledge  of GMACM,  the physical  property  subject to each
Mortgage is free of material damage and is in acceptable repair;

(xx) GMACM has not  received a notice of  default  of any senior  mortgage  loan
related to a Mortgaged  Property  which has not been cured by a party other than
the Servicer;

(xxi) Each Mortgage  Loan has a  substantially  similar  definition of the prime
rate as the Index applicable to the related Loan Rate;

(xxii)  None of the Mortgage Loans is a reverse mortgage loan;

                                       15
<PAGE>

(xxiii) No Initial  Mortgage  Loan has an original term to maturity in excess of
300  months.  Interest  rate  adjustments  for the  Mortgage  Loans prior to the
Cut-Off Date or Subsequent Cut-Off Date were made in compliance with the related
Mortgage and Loan  Agreement.  Over the term of any Mortgage Loan, the Loan Rate
may not exceed the related Maximum Loan Rate, if any;

(xxiv) As of the Cut-Off  Date,  the Initial  Mortgage  Loans have  Maximum Loan
Rates which range between 15.00% and the maximum interest rate allowed under the
applicable  state law. The current Gross Margins for the Initial  Mortgage Loans
range  between 0% (not  including  teaser  rates) and 7.000%,  and the  weighted
average  Gross  Margin  for the  Mortgage  Loans is  approximately  1.334%  (not
including teaser rates) as of the Cut-Off Date. As of the Cut-Off Date, the Loan
Rates on the Initial  Mortgage Loans range between 3.250% (not including  teaser
rates) and 11.750%.  As of the Cut-Off Date, the weighted  average Loan Rate for
the Initial Mortgage Loans is approximately 6.085% (not including teaser rates).
The  weighted  average  remaining  term to  scheduled  maturity  of the  Initial
Mortgage  Loans on a contractual  basis as of the Cut-Off Date is  approximately
200 months;

(xxv) (A) Each Mortgaged  Property  consists of a single parcel of real property
with a single family or two- to four-family  residence  erected  thereon,  or an
individual  condominium  unit,  planned unit development unit or townhouse.  (B)
With respect to the Initial Mortgage Loans, (a) approximately 14.56% (by Cut-Off
Date  Principal  Balance) are secured by real  property  improved by  individual
condominium units and planned  development  units, (b) approximately  84.17% (by
Cut-Off  Date  Principal  Balance)  are secured by real  property  with a single
family  residence  erected  thereon,  (c)  approximately  1.15% (by Cut-Off Date
Principal  Balance)  are  secured by real  property  with a two- to  four-family
residence erected thereon,  (d)  approximately  0.09% (by Cut-Off Date Principal
Balance) are secured by real property with a townhouses  erected thereon and (e)
0.02% are secured by real property improved by manufactured housing;

(xxvi) As of the Cut-Off Date, (A) the Credit Limits range between approximately
$7,500.00  and  $500,000.00  with an average of  $45,652.32,  and (B) no Initial
Mortgage Loan had a principal balance in excess of $500,000.00;

(xxvii) No more than  approximately  94.08% of the Initial  Mortgage  Loans,  by
aggregate Principal Balance as of the Cut-Off Date, are secured by second liens;

(xxviii) A policy of hazard  insurance and flood insurance,  if applicable,  was
required  from the  Mortgagor  for the Mortgage  Loan when the Mortgage Loan was
originated;

(xxix)  Other  than with  respect  to a payment  default,  there is no  material
default,  breach, violation or event of acceleration existing under the terms of
any Loan Agreement or Mortgage and, to the best of GMACM's  knowledge,  no event
which, with notice and expiration of any grace or cure period,  would constitute
a material default,  breach,  violation or event of acceleration under the terms
of any  Loan  Agreement  or  Mortgage,  and no such  material  default,  breach,
violation  or event  of  acceleration  has been  waived  by  GMACM  involved  in
originating or servicing the related Mortgage Loan;

                                       16
<PAGE>

(xxx) No  instrument  of release or waiver has been executed by GMACM or, to the
best knowledge of GMACM,  by any other person,  in connection  with the Mortgage
Loans,  and no Mortgagor has been released by GMACM or, to the best knowledge of
GMACM,  by any  other  person,  in whole  or in part  from  its  obligations  in
connection therewith;

(xxxi) With respect to each Mortgage  Loan secured by a second lien,  either (a)
no consent for such  Mortgage  Loan was required by the holder or holders of the
related  prior lien,  (b) such consent has been obtained and is contained in the
related  Mortgage  File or (c) no consent for such Mortgage Loan was required by
relevant law;

(xxxii)  With  respect  to  each  Mortgage  Loan,  to the  extent  permitted  by
applicable  law, the related  Mortgage  contains a customary  provision  for the
acceleration of the payment of the unpaid Principal Balance of the Mortgage Loan
in the event the related Mortgaged Property is sold without the prior consent of
the mortgagee thereunder;

(xxxiii)       Reserved;

(xxxiv) Reserved;

(xxxv) None of the  Mortgage  Loans are "high cost  loans",  subject to the Home
Ownership and Equity Protection Act of 1994; and

(xxxvi) GMACM used no selection procedures that identified the Mortgage Loans as
being less desirable or valuable than other comparable mortgage loans originated
or acquired by GMACM under the GMACM Home Equity Program. The Mortgage Loans are
representative  of GMACM's  portfolio of fixed rate and adjustable rate mortgage
loans that were originated under the GMACM Home Equity Program.

               With  respect to this  Section  3.1(b),  representations  made by
GMACM  with  respect  to the WG Trust  Initial  Mortgage  Loans,  made as of the
Cut-Off  Date or the Closing  Date or with  respect to the  Subsequent  Mortgage
Loans sold by WG Trust 2001 and made as of the  Subsequent  Cut-Off  Date or the
Subsequent  Transfer  Date,  are  made by  GMACM in its  capacity  as  Servicer.
Representations  made by GMACM  with  respect to the WG Trust  Initial  Mortgage
Loans or the Subsequent  Mortgage Loans sold by WG Trust 2001 and made as of any
other date, are made by GMACM in its capacity as Seller.

        (c)  WG  Trust  2001  Representations  and  Warranties.  WG  Trust  2001
represents and warrants to the Purchaser,  as of the Closing Date and as of each
Subsequent Transfer Date:

        (I) As to WG Trust 2001:

(i) WG Trust 2001 is a Delaware business trust duly organized,  validly existing
and in good standing under the laws of the State of Delaware;

(ii) WG Trust 2001 has the power and  authority  to make,  execute,  deliver and
perform  its  obligations  under this  Agreement  and each  Subsequent  Transfer
Agreement to which it is a party and all of the transactions  contemplated under
this Agreement and each such Subsequent  Transfer  Agreement,  and has taken all
necessary  action to authorize the execution,  delivery and  performance of this
Agreement and each such Subsequent Transfer Agreement;

                                       17
<PAGE>

(iii) WG Trust 2001 is not required to obtain the consent of any other Person or
any consents,  licenses,  approvals or authorizations  from, or registrations or
declarations  with, any governmental  authority,  bureau or agency in connection
with the execution,  delivery,  performance,  validity or enforceability of this
Agreement  or any  Subsequent  Transfer  Agreement,  except  for such  consents,
licenses,  approvals or  authorizations,  or registrations  or declarations,  as
shall have been obtained or filed, as the case may be;

(iv) The execution and delivery of this  Agreement and any  Subsequent  Transfer
Agreement by WG Trust 2001 and its  performance and compliance with the terms of
this Agreement and each such Subsequent  Transfer  Agreement will not violate WG
Trust 2001's  organizational  documents or constitute a material  default (or an
event which,  with notice or lapse of time, or both, would constitute a material
default)  under,  or result in the material  breach of, any  material  contract,
agreement or other  instrument to which WG Trust 2001 is a party or which may be
applicable to WG Trust 2001 or any of its assets;

(v) No litigation  before any court,  tribunal or governmental body is currently
pending, or to the knowledge of WG Trust 2001 threatened,  against WG Trust 2001
or with respect to this Agreement or any Subsequent  Transfer  Agreement that in
the  opinion of WG Trust 2001 has a  reasonable  likelihood  of  resulting  in a
material  adverse effect on the  transactions  contemplated by this Agreement or
any Subsequent Transfer Agreement;

(vi) This  Agreement  and each  Subsequent  Transfer  Agreement to which it is a
party  constitutes  a legal,  valid and  binding  obligation  of WG Trust  2001,
enforceable  against  WG Trust  2001 in  accordance  with its  terms,  except as
enforceability   may  be   limited   by   applicable   bankruptcy,   insolvency,
reorganization,  moratorium  or other  similar  laws now or  hereafter in effect
affecting the  enforcement  of  creditors'  rights in general and except as such
enforceability   may  be  limited  by  general  principles  of  equity  (whether
considered in a proceeding at law or in equity) or by public policy with respect
to indemnification under applicable securities laws;

(vii)  This  Agreement  constitutes  a  valid  transfer  and  assignment  to the
Purchaser  of all right,  title and  interest  of WG Trust 2001 in and to the WG
Trust Initial Mortgage Loans, including the Cut-Off Date Principal Balances with
respect  to the  WG  Trust  Initial  Mortgage  Loans,  all  Additional  Balances
thereafter  arising,  all monies due or to become due with respect thereto,  and
all  proceeds of such  Cut-Off Date  Principal  Balances  with respect to the WG
Trust Initial  Mortgage  Loans;  and this  Agreement and the related  Subsequent
Transfer  Agreement,  when  executed,  will  constitute  a  valid  transfer  and
assignment  to the Issuer of all right,  title and  interest of WG Trust 2001 in
and to the  related  Subsequent  Mortgage  Loans,  including  the  Cut-Off  Date
Principal  Balances  existing on the  related  Subsequent  Cut-Off  Date and all
Additional  Balances  thereafter  arising,  all monies due or to become due with
respect  thereto,  and all  proceeds  thereof and such funds as are from time to
time  deposited in the Custodial  Account  (excluding  any  investment  earnings
thereon)  as  assets  of the  Trust  and all  other  property  specified  in the
definition  of "Trust" as being part of the corpus of the Trust  conveyed to the
Purchaser by WG Trust 2001; and

                                       18
<PAGE>

(viii) WG Trust  2001 is not in default  with  respect to any order or decree of
any court or any order, regulation or demand of any federal, state, municipal or
governmental agency, which default might have consequences that would materially
and adversely affect the condition  (financial or otherwise) or operations of WG
Trust 2001 or its properties or might have  consequences  that would  materially
adversely affect its performance hereunder.

        (II) As to the WG Trust Initial  Mortgage  Loans as of the Closing Date,
or with respect to each  Subsequent  Mortgage Loan as of the related  Subsequent
Transfer Date:

(i) With respect to the WG Trust Initial  Mortgage Loans or, as applicable,  any
Subsequent  Mortgage Loans sold by WG Trust 2001: (A) the related Loan Agreement
and the Mortgage have not been assigned or pledged, except for any assignment or
pledge  that has been  satisfied  and  released,  (B)  immediately  prior to the
assignment of such Mortgage Loans to the Purchaser (or to the Issuer in the case
of the Subsequent  Mortgage Loans sold by WG Trust 2001), WG Trust 2001 had good
title thereto and (C) WG Trust 2001 is the sole owner and holder of the Mortgage
Loan free and clear of any and all liens,  encumbrances,  pledges,  or  security
interests  (other  than,  with  respect to any  Mortgage  Loan in a second  lien
position,  the lien of the related  first  mortgage)  of any nature and has full
right and  authority,  under  all  governmental  and  regulatory  bodies  having
jurisdiction  over the ownership of the  applicable  Mortgage  Loans to sell and
assign the same pursuant to this Agreement;

(ii) For each WG Trust Initial Mortgage Loans or, as applicable,  any Subsequent
Mortgage Loans sold by WG Trust 2001, the related Mortgage File contains or will
contain each of the documents and instruments  specified to be included  therein
in the  definition  of "Mortgage  File" in Appendix A to the Indenture (it being
understood  that the  Custodian  maintains  the Loan  Agreement  related to each
Mortgage  File and the  Servicer  maintains  the  remainder  of the  items to be
included in the Mortgage File pursuant to the terms of this Agreement);

(iii) WG Trust 2001 has not transferred  the WG Trust Initial  Mortgage Loans to
the Purchaser with any intent to hinder,  delay or defraud any of its creditors;
and

(iv) No  instrument  of release or waiver has been  executed by WG Trust 2001 in
connection with the WG Trust Initial  Mortgage Loans,  and no Mortgagor has been
released  by WG  Trust  2001,  in whole or in  part,  from  its  obligations  in
connection therewith.

        (d)  Remedies.  Upon  discovery by either Seller or GMACM or upon notice
from the Purchaser,  the Enhancer,  the Issuer, the Owner Trustee, the Indenture
Trustee or the Custodian, as applicable, of a breach of such Seller's or GMACM's
respective  representations or warranties in paragraphs (a) or (c)(I) above that
materially  and adversely  affects the interests of the  Securityholders  or the
Enhancer,  as  applicable,  in any  Mortgage  Loan,  GMACM or WG Trust 2001,  as
applicable,  shall,  within 90 days of its discovery or its receipt of notice of
such breach, either (i) cure such breach in all material respects or (ii) to the
extent  that  such  breach  is with  respect  to a  Mortgage  Loan or a  Related
Document,  either  (A)  repurchase  such  Mortgage  Loan from the  Issuer at the
Repurchase  Price, or (B) substitute one or more Eligible  Substitute  Loans for
such Mortgage Loan, in each case in the manner and subject to the conditions and
limitations set forth below.

                                       19
<PAGE>

        Upon  discovery  by  either  Seller  or  GMACM or upon  notice  from the
Purchaser,  the Enhancer,  the Issuer,  GMACM, the Owner Trustee,  the Indenture
Trustee or the Custodian,  as  applicable,  of a breach of a Seller's or GMACM's
representations or warranties in paragraphs (b) or (c)(II),  above, with respect
to any  Mortgage  Loan,  or upon the  occurrence  of a  Repurchase  Event,  that
materially  and  adversely  affects the  interests of the  Securityholders,  the
Enhancer or the  Purchaser in such Mortgage Loan (notice of which shall be given
to the Purchaser by the respective  Seller or GMACM,  if it discovers the same),
notwithstanding  such Seller's or GMACM's lack of knowledge  with respect to the
substance of such representation and warranty, such Seller or GMACM, as the case
may be,  shall,  within 90 days after the earlier of its discovery or receipt of
notice  thereof,  either cure such breach or  Repurchase  Event in all  material
respects  or either (i)  repurchase  such  Mortgage  Loan from the Issuer at the
Repurchase  Price, or (ii) substitute one or more Eligible  Substitute Loans for
such Mortgage Loan, in each case in the manner and subject to the conditions set
forth below. The Repurchase Price for any such Mortgage Loan repurchased by such
Seller or GMACM shall be  deposited  or caused to be  deposited  by the Servicer
into the Custodial Account.  Any purchase of a Mortgage Loan due to a Repurchase
Event shall be the obligation of GMACM.

        In furtherance of the foregoing, if GMACM or the Seller that repurchases
or  substitutes  a  Mortgage  Loan is not a member of MERS and the  Mortgage  is
registered  on the  MERS(R)  System,  GMACM,  at its own expense and without any
right of reimbursement, shall cause MERS to execute and deliver an assignment of
the Mortgage in  recordable  form to transfer the Mortgage from MERS to GMACM or
the Seller and shall cause such Mortgage to be removed from  registration on the
MERS(R) System in accordance with MERS' rules and regulations.

        In the event  that  either  Seller  elects  to  substitute  an  Eligible
Substitute  Loan or Loans for a Deleted Loan  pursuant to this Section 3.1, such
Seller shall deliver to the  Custodian on behalf of the Issuer,  with respect to
such Eligible  Substitute Loan or Loans,  the original Loan Agreement,  with the
Loan Agreement  endorsed as required under the definition of "Mortgage File" and
shall  deliver the other  documents  required to be part of the Mortgage File to
the  Servicer.  No  substitution  will be made in any  calendar  month after the
Determination Date for such month.  Minimum Monthly Payments due with respect to
Eligible  Substitute Loans in the month of substitution shall not be part of the
Trust  Estate and will be retained by the  Servicer and remitted by the Servicer
to such Seller on the next succeeding  Payment Date,  provided that a payment at
least equal to the applicable  Minimum Monthly Payment for such month in respect
of the  Deleted  Loan  has  been  received  by the  Issuer.  For  the  month  of
substitution,  distributions  to  the  Note  Payment  Account  pursuant  to  the
Servicing  Agreement will include the Minimum  Monthly  Payment due on a Deleted
Loan for such month and  thereafter  such Seller shall be entitled to retain all
amounts  received in respect of such Deleted Loan.  The Servicer  shall amend or
cause to be amended the  Mortgage  Loan  Schedule to reflect the removal of such
Deleted Loan and the  substitution of the Eligible  Substitute Loan or Loans and
the  Servicer  shall  deliver the amended  Mortgage  Loan  Schedule to the Owner
Trustee,  the Indenture Trustee and the Enhancer.  Upon such  substitution,  the
Eligible  Substitute  Loan or  Loans  shall  be  subject  to the  terms  of this
Agreement and the Servicing Agreement in all respects,  GMACM shall be deemed to
have made the  representations  and  warranties  with  respect  to the  Eligible
Substitute Loan contained herein set forth in Section 3.1(b) (other than clauses
(viii)  (xiii),  (xxiv),  (xxv)(B),  (xxvi) and  (xxvii)  thereof and other than
clauses  (iii)  and  (ix)  thereof  in the  case of  Eligible  Substitute  Loans
substituted by WG Trust 2001); and if the Seller is WG Trust 2001, WG Trust 2001
shall be deemed to have made the  representations  and  warranties  set forth in
Section  3.1(c)(II);  in each  case,  as of the  date of  substitution,  and the
related Seller shall be deemed to have made a  representation  and warranty that
each Mortgage Loan so substituted is an Eligible  Substitute Loan as of the date
of  substitution.  In  addition,  GMACM  shall be  obligated  to  repurchase  or
substitute for any Eligible  Substitute Loan as to which a Repurchase  Event has
occurred as provided herein.  In connection with the substitution of one or more
Eligible  Substitute  Loans for one or more Deleted  Loans,  the Servicer  shall

                                       20
<PAGE>

determine the amount (such amount, a "Substitution  Adjustment Amount"), if any,
by which the aggregate  principal balance of all such Eligible  Substitute Loans
as of the date of substitution is less than the aggregate  principal  balance of
all such  Deleted  Loans  (after  application  of the  principal  portion of the
Minimum  Monthly  Payments  due in the  month  of  substitution  that  are to be
distributed  to the Note  Payment  Account in the month of  substitution).  Such
Seller shall deposit the amount of such shortfall into the Custodial  Account on
the date of substitution, without any reimbursement therefor.

        Upon  receipt by the  Indenture  Trustee on behalf of the Issuer and the
Custodian of written notification, signed by a Servicing Officer, of the deposit
of such Repurchase Price or of such substitution of an Eligible  Substitute Loan
(together with the complete related Mortgage File) and deposit of any applicable
Substitution  Adjustment  Amount as provided above, the Custodian,  on behalf of
the Indenture  Trustee,  shall (i) release to such Seller or GMACM,  as the case
may be, the related Loan  Agreement for the Mortgage Loan being  repurchased  or
substituted for, (ii) cause the Servicer to release to such Seller any remaining
documents  in the related  Mortgage  File which are held by the  Servicer  and ,
(iii) the  Indenture  Trustee on behalf of the Issuer shall  execute and deliver
such  instruments  of transfer or assignment  prepared by the Servicer,  in each
case without recourse, as shall be necessary to vest in such Seller or GMACM, as
the case may be, or its respective designee such Mortgage Loan released pursuant
hereto and thereafter such Mortgage Loan shall not be an asset of the Issuer.

        It is understood and agreed that the obligation of each Seller and GMACM
to cure any breach,  or to repurchase or substitute  for any Mortgage Loan as to
which such a breach has occurred and is  continuing,  shall  constitute the sole
remedy  respecting  such breach  available  to the  Purchaser,  the Issuer,  the
Certificateholders  (or the Owner  Trustee on behalf of the  Certificateholders)
and the  Noteholders  (or the  Indenture  Trustee on behalf of the  Noteholders)
against such Seller and GMACM.

        It is understood and agreed that the  representations and warranties set
forth in this  Section 3.1 shall  survive  delivery of the  respective  Mortgage
Files to the Issuer or the Custodian.

                                   ARTICLE IV

                               SELLERS' COVENANTS

Section 4.1 Covenants of the Sellers.  Each Seller hereby covenants that, except
for the transfer  hereunder and as of any Subsequent  Transfer Date, it will not
sell, pledge, assign or transfer to any other Person, or grant, create, incur or
assume any Lien on any  Mortgage  Loan,  or any  interest  therein,  except with
respect to any Excluded Amount. Each Seller shall notify the Issuer (in the case
of the Initial  Mortgage Loans, as assignee of the Purchaser),  of the existence
of any Lien (other than as provided above) on any Mortgage Loan immediately upon

                                       21
<PAGE>

discovery thereof; and each Seller shall defend the right, title and interest of
the  Issuer (in the case of the  Initial  Mortgage  Loans,  as  assignee  of the
Purchaser)  in, to and under the  Mortgage  Loans  against  all  claims of third
parties claiming through or under such Seller;  provided,  however, that nothing
in this Section 4.1 shall be deemed to apply to any Liens for municipal or other
local taxes and other governmental charges if such taxes or governmental charges
shall not at the time be due and payable or if either Seller shall  currently be
contesting the validity thereof in good faith by appropriate Proceedings.

                                   ARTICLE V

                                    SERVICING

Section 5.1  Servicing.  GMACM shall service the Mortgage  Loans pursuant to the
terms and conditions of the Servicing  Agreement and the Program Guide and shall
service the  Mortgage  Loans  directly or through one or more  sub-servicers  in
accordance therewith.

                                       22
<PAGE>

                                   ARTICLE VI

                      LIMITATION ON LIABILTY OF THE SELLERS

Section 6.1  Limitation  on  Liability of the  Sellers.  None of the  directors,
officers,  employees  or agents of either  GMACM or WG Trust 2001 shall be under
any liability to the Purchaser or the Issuer, it being expressly understood that
all such  liability is expressly  waived and released as a condition  of, and as
consideration  for, the execution of this Agreement and any Subsequent  Transfer
Agreement.  Except as and to the  extent  expressly  provided  in the  Servicing
Agreement,  GMACM and WG Trust  2001  shall not be under  any  liability  to the
Issuer, the Owner Trustee, the Indenture Trustee or the  Securityholders.  GMACM
or WG Trust 2001 and any  director,  officer,  employee  or agent of GMACM or WG
Trust  2001  may rely in good  faith on any  document  of any kind  prima  facie
properly  executed and submitted by any Person  respecting  any matters  arising
hereunder.

                                  ARTICLE VII

                                   TERMINATION

Section 7.1  Termination.  The obligations and  responsibilities  of the parties
hereto shall terminate upon the termination of the Trust Agreement.

                                  ARTICLE VIII

                            MISCELLANEOUS PROVISIONS

Section 8.1  Amendment.  This  Agreement may be amended from time to time by the
parties  hereto by  written  agreement  with the prior  written  consent  of the
Enhancer (which consent shall not be unreasonably withheld.

Section 8.2 Governing Law. THIS AGREEMENT  SHALL BE GOVERNED BY AND CONSTRUED IN
ACCORDANCE  WITH THE LAWS OF THE STATE OF NEW YORK AND THE  OBLIGATIONS,  RIGHTS
AND REMEDIES OF THE PARTIES  HEREUNDER  SHALL BE DETERMINED  IN ACCORDANCE  WITH
SUCH LAWS.

Section 8.3 Notices. All demands,  notices and communications hereunder shall be
in writing and shall be deemed to have been duly given if  personally  delivered
at or mailed by registered mail, postage prepaid, addressed as follows:

(a)     if to the GMACM:

                          GMAC Mortgage Corporation
                          100 Witmer Road
                          Horsham, Pennsylvania  10944
                          Attention: Thomas J. O'Hara, Senior Vice President
                   Re: GMACM Home Equity Loan Trust 2002-HE1;

                                       23
<PAGE>

(b)     if to WG Trust 2001:

                          Walnut Grove Mortgage Loan Trust 2001-A
                          c/o Wilmington Trust Company
                          1100 North Market Street
                          Wilmington, Delaware 19890
                          Attention: Walnut Grove Mortgage Loan Trust 2001-A
                          Re:  GMACM Home Equity Loan Trust 2002-HE1

(c)     if to the Purchaser:

                    Residential Asset Mortgage Products, Inc.
                          8400 Normandale Lake Boulevard
                          Minneapolis, Minnesota 55437
                          Attention:President
                   Re: GMACM Home Equity Loan Trust 2002-HE1;

(d)     if to the Indenture Trustee:

                          (i) prior to May 6, 2002

                          Wells Fargo Bank Minnesota, N.A
                          11000 Broken Land Parkway
                          Columbia, Maryland 21044
                          Attention:  Corporate Trust Services -
                          GMACM Home Equity Loan Trust
                          2002-HE1, and

                          (ii) as of May 6, 2002

                          Wells Fargo Bank Minnesota, N.A
                          9062 Old Annapolis Road
                          Columbia, Maryland 21045-1951
                          Attention:  GMACM Home Equity Loan Trust 2002-HE1;

(e)     if to the Issuer:

                          c/o Wilmington Trust Company, as Owner Trustee
                          Rodney Square North
                          1100 North Market Street
                          Wilmington, Delaware 19890-0001
                          Telecopier:  212-312-3215
                          Re:  Corporate Trust Services - GMACM Home Equity
                                Loan Trust
                          2002-HE1; or

(f)     if to the Enhancer:

                          Financial Guaranty Insurance Company
                          125 Park Avenue
                          New York, New York 10017
                          Attention:Research and Risk Management
                          Telecopier:  212-312-3215
                          Re:  GMACM Home Equity Loan Trust 2002-HE1;

                                       24
<PAGE>

or, with respect to any of the foregoing  Persons,  at such other address as may
hereafter be furnished to the other foregoing Persons in writing.

Section 8.4  Severability  of  Provisions.  If any one or more of the covenants,
agreements,  provisions or terms of this Agreement shall be held invalid for any
reason whatsoever, then such covenants, agreements, provisions or terms shall be
deemed severable from the remaining covenants,  agreements,  provisions or terms
of this Agreement and shall in no way affect the validity of  enforceability  of
the other provisions of this Agreement.

Section 8.5 Relationship of Parties. Nothing herein contained shall be deemed or
construed to create a partnership or joint venture among the parties hereto, and
the services of the GMACM shall be rendered as an independent contractor and not
as agent for the Purchaser.

Section  8.6  Counterparts.  This  Agreement  may be  executed  in any number of
counterparts, each of which, when so executed, shall be deemed to be an original
and such counterparts, together, shall constitute one and the same agreement.

Section 8.7  Further  Agreements.  The parties  hereto each agree to execute and
deliver to the other such additional documents, instruments or agreements as may
be necessary or appropriate to effectuate the purposes of this Agreement.

Section 8.8 Intention of the Parties.  It is the intention of the parties hereto
that the Purchaser  will be purchasing on the Closing Date, and the Sellers will
be selling on the Closing  Date,  the Initial  Mortgage  Loans,  rather than the
Purchaser  providing a loan to the Sellers secured by the Initial Mortgage Loans
on the Closing Date;  and that the Issuer will be purchasing on each  Subsequent
Transfer Date, and the Sellers will be selling on each Subsequent Transfer Date,
the related Subsequent  Mortgage Loans,  rather than the Issuer providing a loan
to the  Sellers  secured  by the  related  Subsequent  Mortgage  Loans  on  each
Subsequent Transfer Date.  Accordingly,  the parties hereto each intend to treat
this  transaction  for federal income tax purposes as (i) a sale by the Sellers,
and a purchase by the  Purchaser,  of the Initial  Mortgage Loans on the Closing
Date  and (ii) a sale by the  Sellers,  and a  purchase  by the  Issuer,  of the
related  Subsequent  Mortgage  Loans  on  each  Subsequent  Transfer  Date.  The
Purchaser and the Issuer shall each have the right to review the Mortgage  Loans
and the Related Documents to determine the characteristics of the Mortgage Loans
which will affect the federal  income tax  consequences  of owning the  Mortgage
Loans, and each Seller shall cooperate with all reasonable  requests made by the
Purchaser or the Issuer in the course of such review.

Section 8.9    Successors and Assigns; Assignment of this Agreement.
               ----------------------------------------------------

(a) This Agreement  shall bind and inure to the benefit of and be enforceable by
the parties hereto and their respective  permitted  successors and assigns.  The
obligations of each Seller under this Agreement  cannot be assigned or delegated
to a third party without the consent of the Enhancer and the Purchaser  (and the
Issuer with respect to the transfer of any  Subsequent  Mortgage  Loans),  which
consent  shall be at the  Purchaser's  sole  discretion  (and the Issuer's  sole

                                       25
<PAGE>

discretion  with  respect to the  transfer of any  Subsequent  Mortgage  Loans);
provided, that each Seller may assign its obligations hereunder to any Affiliate
of such Seller,  to any Person succeeding to the business of such Seller, to any
Person  into which such  Seller is merged and to any Person  resulting  from any
merger, conversion or consolidation to which such Seller is a party. The parties
hereto  acknowledge  that (i) the  Purchaser is acquiring  the Initial  Mortgage
Loans for the purpose of  contributing  them to the GMACM Home Equity Loan Trust
2002-HE1 and (ii) the Issuer is acquiring the Subsequent  Mortgage Loans for the
purpose of pledging the Subsequent  Mortgage Loans to the Indenture  Trustee for
the benefit of the Noteholders and the Enhancer.

(b) As an  inducement  to the  Purchaser  and the Issuer to purchase the Initial
Mortgage Loans and to the Issuer to purchase any Subsequent Mortgage Loans, each
Seller  acknowledges  and consents to (i) the assignment by the Purchaser to the
Issuer of all of the  Purchaser's  rights against either Seller pursuant to this
Agreement   insofar  as  such  rights  relate  to  the  Initial  Mortgage  Loans
transferred  to the Issuer and to the  enforcement  or  exercise of any right or
remedy against any of the Sellers pursuant to this Agreement by the Issuer, (ii)
the  enforcement  or exercise of any right or remedy  against any of the Sellers
pursuant to this  Agreement by or on behalf of the Issuer and (iii) the Issuer's
pledge of its  interest  in this  Agreement  to the  Indenture  Trustee  and the
enforcement by the Indenture  Trustee of any such right or remedy against either
Seller following an Event of Default under the Indenture.  Such enforcement of a
right or remedy by the Issuer, the Owner Trustee,  the Enhancer or the Indenture
Trustee, as applicable,  shall have the same force and effect as if the right or
remedy had been enforced or exercised by the Purchaser or the Issuer directly.

Section 8.10 Survival.  The  representations  and warranties made herein by each
Seller and the provisions of Article VI hereof shall survive the purchase of the
Initial  Mortgage Loans hereunder and any transfer of Subsequent  Mortgage Loans
pursuant to this Agreement and the related Subsequent Transfer Agreement.

Section  8.11 Third  Party  Beneficiary.  The  Enhancer  shall be a third  party
beneficiary  hereof and shall be  entitled  to enforce  the  provisions  of this
Agreement as if a party hereto.

                                       26
<PAGE>

    IN WITNESS  WHEREOF,  the parties  hereto have caused  their names to be
signed to this  Mortgage Loan Purchase  Agreement by their  respective  officers
thereunto duly authorized as of the day and year first above written.

             RESIDENTIAL ASSET MORTGAGE PRODUCTS, INC., as
     Purchaser

             By: /s/ Patricia C. Taylor
                 ---------------------------------------
                 Name: Patricia C. Taylor
                 Title:   Vice President

             GMAC MORTGAGE CORPORATION,
                   as Seller and Servicer

             By: /s/ Thomas J. O'Hara
                 ---------------------------------------
                 Name: Thomas J. O'Hara
                 Title:   Senior Vice President

             WALNUT GROVE MORTGAGE LOAN
             TRUST 2001-A, as Seller

             By: WILMINGTON TRUST COMPANY,
                    not in its individual capacity but solely
                    as
                    Owner Trustee

             By: /s/ Patricia A. Evans
                 ---------------------------------------
                 Name: Patricia A. Evans
                 Title: Assistant Vice President

                                       27
<PAGE>

                          GMACM HOME EQUITY LOAN TRUST 2002-HE1, as Issuer

                          By: WILMINGTON TRUST COMPANY,
                                 not in its individual capacity but solely
                                 as
                                 Owner Trustee

                          By: /s/ Patricia A. Evans
                              ---------------------------------------
                              Name: Patricia A. Evans
                              Title: Assistant Vice President

                          WELLS FARGO BANK MINNESOTA, N.A., as Indenture
                   Trustee

                          By: /s/ Peter A. Gobell
                              ---------------------------------------
                              Name: Peter A. Gobell
                              Title: Vice President

                                       28
<PAGE>

                                    EXHIBIT 1

                             MORTGAGE LOAN SCHEDULE

<PAGE>

                                        1
                                    EXHIBIT 2

                      FORM OF SUBSEQUENT TRANSFER AGREEMENT

        Pursuant to this Subsequent  Transfer  Agreement No. (the  "Agreement"),
dated as of , , between  [_________],  as seller (the "Seller"),  and GMACM Home
Equity  Loan Trust  2002-HE1,  as issuer  (the  "Issuer"),  and  pursuant to the
mortgage loan purchase  agreement dated as of March 27, 2002 (the "Mortgage Loan
Purchase Agreement"), among GMAC Mortgage Corporation, as a seller and servicer,
Walnut Grove Mortgage Loan Trust 2001-A, as a Seller, Residential Asset Mortgage
Products, Inc., as purchaser (the "Purchaser"),  the Issuer and Wells Fargo Bank
Minnesota,  N.A., as indenture trustee (the "Indenture Trustee"), the Seller and
the Issuer agree to the sale by the Seller and the purchase by the Issuer of the
mortgage loans listed on the attached Schedule of Subsequent Mortgage Loans (the
"Subsequent Mortgage Loans").

        Capitalized  terms used and not  defined  herein  have their  respective
meanings as set forth in Appendix A to the indenture dated as of March 27, 2002,
between the Issuer and the Indenture Trustee, which meanings are incorporated by
reference  herein.  All other  capitalized  terms  used  herein  shall  have the
meanings specified herein.

        Section 1.    Sale of Subsequent Mortgage Loans.
                      ---------------------------------

        (a) The Seller does hereby sell,  transfer,  assign, set over and convey
to the Issuer,  without recourse, all of its right, title and interest in and to
the Subsequent  Mortgage Loans (including the Subsequent  Cut-Off Date Principal
Balance now  existing  and all  Additional  Balances  thereafter  arising to and
including  the  date  immediately   preceding  the  commencement  of  the  Rapid
Amortization  Period),  all principal received and interest thereon on and after
the  Subsequent  Cut-Off  Date,  all monies due or to become due thereon and all
items with respect to the Subsequent  Mortgage Loans to be delivered pursuant to
Section 2.2 of the Mortgage Loan Purchase Agreement; provided, however, that the
Seller  reserves  and retains all right,  title and interest in and to principal
received and interest  accruing on the  Subsequent  Mortgage  Loans prior to the
Subsequent Cut-Off Date. The Seller, contemporaneously with the delivery of this
Agreement, has delivered or caused to be delivered to the Indenture Trustee each
item set forth in Section 2.2 of the Mortgage Loan Purchase Agreement.

        The  transfer  to the  Issuer by the Seller of the  Subsequent  Mortgage
Loans identified on the Mortgage Loan Schedule shall be absolute and is intended
by the parties  hereto to  constitute  a sale by the Seller to the Issuer on the
Subsequent Transfer Date of all the Seller's right, title and interest in and to
the Subsequent Mortgage Loans, and other property as and to the extent described
above,  and the  Issuer  hereby  acknowledges  such  transfer.  In the event the
transactions  set forth  herein  shall be deemed  not to be a sale,  the  Seller
hereby  grants  to the  Issuer as of the  Subsequent  Transfer  Date a  security
interest in all of the Seller's  right,  title and interest in, to and under all
accounts, chattel papers, general intangibles,  contract rights, certificates of
deposit,  deposit accounts,  instruments,  documents,  letters of credit, money,
payment intangibles,  advices of credit,  investment  property,  goods and other
property  consisting  of,  arising under or related to the  Subsequent  Mortgage
Loans,  and such  other  property,  to secure  all of the  Issuer's  obligations

                                       1
<PAGE>

hereunder,  and this  Agreement  shall  constitute  a security  agreement  under
applicable  law. The Seller agrees to take or cause to be taken such actions and
to  execute  such  documents,  including  without  limitation  the filing of all
necessary  UCC-1  financing  statements  filed in the State of Delaware  and the
Commonwealth  of  Pennsylvania  (which shall be  submitted  for filing as of the
Subsequent Transfer Date), any continuation  statements with respect thereto and
any  amendments  thereto  required to reflect a change in the name or  corporate
structure  of  the  Seller  or the  filing  of any  additional  UCC-1  financing
statements  due to the  change  in  the  principal  office  or  jurisdiction  of
incorporation  of the  Seller,  as are  necessary  to perfect  and  protect  the
Issuer's interests in each Subsequent Mortgage Loan and the proceeds thereof.

        (b) The  expenses and costs  relating to the delivery of the  Subsequent
Mortgage Loans, this Agreement and the Mortgage Loan Purchase Agreement shall be
borne by the Seller.

        (c)   Additional terms of the sale are set forth on Attachment A hereto.

        Section 2.    Representations and Warranties; Conditions Precedent.
                      ----------------------------------------------------

        (a) The Seller hereby affirms the representations and warranties made by
it and set forth in Section 3.1 of the Mortgage  Loan  Purchase  Agreement  that
relate to the Seller or the Subsequent Mortgage Loans as of the date hereof. The
Seller hereby  confirms that each of the  conditions set forth in Section 2.2(b)
of the Mortgage Loan Purchase  Agreement are satisfied as of the date hereof and
further represents and warrants that each Subsequent Mortgage Loan complies with
the  requirements  of this  Agreement  and Section  2.2(c) of the Mortgage  Loan
Purchase  Agreement.  GMACM, as Servicer of the Subsequent Mortgage Loans hereby
affirms the  representations  and warranties made by it regarding the Subsequent
Mortgage  Loans as set  forth  in  Section  3.1 of the  Mortgage  Loan  Purchase
Agreement.

        (b) The Seller is  solvent,  is able to pay its debts as they become due
and has  capital  sufficient  to  carry  on its  business  and  its  obligations
hereunder;  it will not be rendered  insolvent by the  execution and delivery of
this  Instrument or by the  performance of its  obligations  hereunder nor is it
aware  of  any  pending  insolvency;  no  petition  of  bankruptcy  (or  similar
insolvency proceeding) has been filed by or against the Seller prior to the date
hereof.

        (c) All terms and  conditions of the Mortgage  Loan  Purchase  Agreement
relating to the  Subsequent  Mortgage  Loans are hereby  ratified and confirmed;
provided,  however,  that in the event of any  conflict the  provisions  of this
Agreement  shall  control over the  conflicting  provisions of the Mortgage Loan
Purchase Agreement.

        Section  3.  Recordation  of  Instrument.  To the  extent  permitted  by
applicable law or a memorandum  thereof if permitted under  applicable law, this
Agreement is subject to recordation in all  appropriate  public offices for real
property  records in all of the counties or other  comparable  jurisdictions  in
which  any or all  of the  properties  subject  to  the  related  Mortgages  are
situated,  and in any other  appropriate  public  recording office or elsewhere,
such recordation to be effected by the Servicer at the  Noteholders'  expense on
direction of the Majority Noteholders or the Enhancer, but only when accompanied
by an Opinion of Counsel to the  effect  that such  recordation  materially  and
beneficially  affects the  interests  of the  Noteholders  or the Enhancer or is
necessary for the administration or servicing of the Subsequent Mortgage Loans.

                                       2
<PAGE>

        Section  4.  GOVERNING  LAW.  THIS  INSTRUMENT  SHALL  BE  CONSTRUED  IN
ACCORDANCE  WITH THE LAWS OF THE STATE OF NEW YORK AND THE  OBLIGATIONS,  RIGHTS
AND REMEDIES OF THE PARTIES  HEREUNDER  SHALL BE DETERMINED  IN ACCORDANCE  WITH
SUCH LAWS.

     Section 5.  Counterparts.  This Instrument may be executed in counterparts,
each of which, when so executed,  shall be deemed to be an original and together
shall constitute one and the same instrument.

     Section 6.  Successors  and  Assigns.  This  Agreement  shall  inure to the
benefit  of and be binding  upon the Seller and the Issuer and their  respective
successors and assigns.

          [----------------------------------],
             as Seller

          By:
              ---------------------------------------
              Name:
              Title:

          GMACM HOME EQUITY LOAN TRUST 2002-HE1, as Issuer

          By: WILMINGTON TRUST COMPANY,
                 not in its individual capacity but solely
                 as
                 Owner Trustee

          By:
              ---------------------------------------
              Name:
              Title:

          GMAC MORTGAGE CORPORATION,
             as Servicer

          By:
              ---------------------------------------
              Name:
              Title:

                                       3
<PAGE>

                                   Attachments

A.      Additional terms of sale.
B.      Schedule of Subsequent Mortgage Loans.
C.      Seller's Officer's Certificate.
D.      Seller's Officer's Certificate (confirmation of Enhancer approval).

                                       4
<PAGE>

                            GMACM HOME EQUITY LOAN TRUST 2002-HE1

                    ATTACHMENT A TO FORM OF SUBSEQUENT TRANSFER AGREEMENT

                                      ------------, ----

A.
      1.   Subsequent Cut-Off Date:
      2.   Pricing Date:
      3.   Subsequent Transfer Date:
      4.   Aggregate Principal Balance of the Subsequent Mortgage Loans as
           of the Subsequent Cut-Off Date:
      5.   Purchase Price:                                100.00%
B.
As to all Subsequent Mortgage Loans:
      1.   Longest stated term to maturity:                          months
                                                          ----------
      2.   Minimum Loan Rate:                                        %
                                                          ----------
      3.   Maximum Loan Rate:                                        %
                                                          ----------
      4.   WAC of all Subsequent Mortgage Loans:                     %
                                                          ----------
      5.   WAM of all Subsequent Mortgage Loans:                     %
                                                          ----------
      6.   Largest Principal Balance:                     $
      7.   Non-owner occupied Mortgaged Properties:                  %
                                                          ----------
      8.   California zip code concentrations:                % and      %
                                                          ----      ----
      9.   Condominiums:                                             %
                                                          ----------
      10.  Single-family:                                            %
                                                          ----------
      11.  Weighted average term since origination:                 %
                                                          ----------
      12.  Principal balance of Subsequent Mortgage Loans with respect to    $
           which the Mortgagor is an employee of GMACM or an affiliate of
           GMACM:
      13.  Number of Subsequent Mortgage Loans with respect to which the
           Mortgagor is an employee of GMACM or an affiliate of GMACM:

<PAGE>

                                    EXHIBIT 3

                             FORM OF ADDITION NOTICE

DATE:

Wells Fargo Bank Minnesota, N.A                  Moody's Investors Service, Inc.
11000 Broken Land Parkway                         99 Church Street
Columbia, Maryland 21044                          New York, New York 10007

Financial Guaranty Insurance Company              Fitch Ratings
115 Broadway                                      One State Street Plaza
New York, New York 10006                          New York, New York 10004
Attention:  Research and Risk Management
Re: GMACM Home Equity Loan Trust 2002-HE1

Standard & Poor's, a division of The              Wilmington Trust Company
McGraw-Hill Companies, Inc.                       1100 North Market Street
26 Broadway                                       Wilmington, Delaware 19890
New York, New York 10004-1064

                    Re: GMACM Home Equity Loan Trust 2002-HE1

Ladies and Gentlemen:

        Pursuant to Section 2.2 of the mortgage loan purchase agreement dated as
of March 27, 2002 (the "Purchase  Agreement"),  among GMAC Mortgage Corporation,
as a Seller and Servicer,  Walnut Grove Mortgage Loan Trust 2001-A, as a Seller,
Residential Asset Mortgage Products, Inc., as Purchaser,  GMACM Home Equity Loan
Trust  2002-HE1,  as Issuer and Wells Fargo Bank  Minnesota,  N.A., as Indenture
Trustee,  the Seller has designated the Subsequent  Mortgage Loans identified on
the Mortgage Loan Schedule  attached hereto to be sold to the Issuer on , , with
an aggregate  Principal  Balance of $ . Capitalized  terms not otherwise defined
herein have the meaning set forth in the Appendix A to the indenture dated as of
March 27, 2002, between the Issuer and the Indenture Trustee.

        Please  acknowledge  your receipt of this notice by  countersigning  the
enclosed copy in the space  indicated below and returning it to the attention of
the undersigned.

                                            Very truly yours,

                                            [----------------------------],
                                               as Seller

                                            By:
                                                ----------------------------
                                                Name:
                                                Title:

ACKNOWLEDGED AND AGREED:

Wells Fargo Bank Minnesota, N.A.,
    as Indenture Trustee

By:
    --------------------------------
    Name:
    Title:

<PAGE>Financial Guaranty Insurance Company
125 Park Avenue
New York, New York  10017
(212) 312-3000
(800) 352-0001

SURETY BOND

Form 9133
Page 1 of 4
Issuer:  GMACM Home Equity Loan               Policy Number:  02030009
          Trust 2002-HE1                      Control Number:  0010001

Insured Obligations:
$400,000,000 in principal  amount of GMACM Home Equity  Loan-Backed  Term Notes,
Series 2002-HE1, Class A-1 and Class A-2 (collectively, the "Class A Notes")

Indenture Trustee:  Wells Fargo Bank Minnesota, N.A.

Financial Guaranty Insurance Company  ("Financial  Guaranty"),  a New York stock
insurance  company,  in  consideration  of the right of  Financial  Guaranty  to
receive  monthly  premiums  pursuant to the Indenture (as defined below) and the
Insurance Agreement referred to therein, and subject to the terms of this Surety
Bond, hereby  unconditionally and irrevocably agrees to pay each Insured Amount,
to the extent set forth in the Indenture,  to the Indenture  Trustee named above
or its  successor,  as trustee for the  Holders of the Class A Notes,  except as
otherwise provided herein with respect to Preference Amounts.  Capitalized terms
used and not otherwise  defined herein shall have the meanings  assigned to such
terms in the Annex A attached to the  Indenture as in effect and executed on the
date hereof.

The term  "Deficiency  Amount"  means,  with respect to any Payment Date and the
Class A Notes, as applicable, an amount, if any, equal to the sum of:

         (1)     the amount by which the aggregate amount of accrued interest on
                 the Class A Notes, excluding any Relief Act Shortfalls for that
                 Payment Date, at the respective Note Rates on that Payment Date
                 exceeds  the  amount on  deposit  in the Note  Payment  Account
                 available  for interest  distributions  on the Class A Notes on
                 that Payment Date; and

         (2)     (i) with  respect  to any  Payment  Date  that is not the Final
                 Payment Date, any  Liquidation  Loss Amount with respect to the
                 Mortgage  Loans  for  that  Payment  Date,  to the  extent  not
                 distributed  as part of the Principal  Distribution  Amount for
                 that   Payment   Date   or   a   reduction   in   the   related
                 Overcollateralization Amount; or

                 (ii) on the  Final  Payment  Date,  the  aggregate  outstanding
                 balance of the Class A Notes to the extent  otherwise  not paid
                 on that date.

The term "Insured  Amount" for any Payment Date means (1) any Deficiency  Amount
for such Payment Date and the Class A Notes and (2) any Preference  Amount to be
paid pursuant to the terms of this Surety Bond on the Payment Date in respect of
the Class A Notes.

<PAGE>

The term  "Final  Payment  Date" for each  Class of the Class A Notes  means the
Payment Date occurring in January, 2029.

Financial  Guaranty  will pay a  Deficiency  Amount with  respect to the Class A
Notes by 12:00 noon (New York City Time) in immediately  available  funds to the
Indenture  Trustee on the later of (i) the second  Business  Day  following  the
Business  Day on which  Financial  Guaranty  shall have  received  Notice that a
Deficiency  Amount is due in respect of the Class A Notes,  and (ii) the Payment
Date on which the  related  Deficiency  Amount is payable to the  Holders of the
Class A Notes pursuant to the Indenture,  for disbursement to the Holders of the
Class A Notes in the same manner as other  payments  with respect to the Class A
Notes are required to be made. Any Notice  received by Financial  Guaranty after
12:00 noon New York City time on a given  Business Day or on any day that is not
a Business Day shall be deemed to have been  received by  Financial  Guaranty on
the next succeeding Business Day.

Upon payment of a Deficiency Amount hereunder, Financial Guaranty shall be fully
subrogated  to the rights of the  Holders  of the Class A Notes to  receive  the
amount so paid.  Financial  Guaranty's  obligations  with respect to the Class A
Notes  hereunder  with respect to each Payment Date shall be  discharged  to the
extent funds  consisting  of the related  Deficiency  Amount are received by the
Indenture  Trustee on behalf of the  Holders of the Class A Notes for payment to
such Holders, as provided in the Indenture and herein, whether or not such funds
are properly applied by the Indenture Trustee.

If any  portion  or all of  any  amount  that  is  insured  hereunder  that  was
previously distributed to a holder of Class A Notes is recoverable and recovered
from such Holder as a voidable preference by a trustee in bankruptcy pursuant to
the U.S.  Bankruptcy Code,  pursuant to a final  nonappealable  order of a court
exercising  proper  jurisdiction  in an insolvency  proceeding (a "Final Order")
(such recovered amount, a "Preference  Amount"),  Financial Guaranty will pay on
the guarantee  described in the first paragraph  hereof, an amount equal to each
such  Preference  Amount by 12:00  noon on the  second  Business  Day  following
receipt by Financial  Guaranty on a Business Day of (x) a certified  copy of the
court order  requiring  the return of the  Preference  Amount,  together with an
opinion of counsel  satisfactory  to Financial  Guaranty that the order is final
and not  subject  to  appeal  (a  "Final  Order"),  (y) an  assignment,  in form
reasonably   satisfactory  to  Financial  Guaranty,   irrevocably  assigning  to
Financial  Guaranty all rights and claims of the Indenture  Trustee  and/or such
Holder  of the  Class A Notes  relating  to or  arising  under any Class A Notes
against  the  debtor  who  paid  such  Preference  Amount  and  constituting  an
appropriate instrument,  in form satisfactory to Financial Guaranty,  appointing
Financial  Guaranty as the agent of the Indenture  Trustee and/or such Holder in
respect of such Preference  Amount,  including  without  limitation in any legal
proceeding  related to the  Preference  Amount,  and (z) a Notice  appropriately
completed and executed by the Indenture  Trustee or such Holder, as the case may

<PAGE>

be.   Such   payment   shall   be   made   to   the    receiver,    conservator,
debtor-in-possession  or trustee in bankruptcy  named in the Final Order and not
to the  Indenture  Trustee or Holder of the Class A Notes  directly  (unless the
Holder  has  previously   paid  such  amount  to  such  receiver,   conservator,
debtor-in-possession  or trustee named in such Final Order in which case payment
shall be made to the  Indenture  Trustee  for  distribution  to the Holder  upon
delivery  of  proof  of  such  payment  reasonably   satisfactory  to  Financial
Guaranty).  Notwithstanding the foregoing,  in no event shall Financial Guaranty
be (i)  required  to make any  payment  under this Surety Bond in respect of any
Preference  Amount to the extent such Preference  Amount is comprised of amounts
previously paid by Financial Guaranty  hereunder,  or (ii) obligated to make any
payment in respect of any Preference Amount,  which payment represents a payment
of the  principal  amount  of any  Class A Notes,  prior  to the time  Financial
Guaranty otherwise would have been required to make a payment in respect of such
principal,  in which  case  Financial  Guaranty  shall  pay the  balance  of the
Preference Amount when such amount otherwise would have been required.

Any of the  documents  required  under  clauses (x) through (z) of the preceding
paragraph that are received by Financial Guaranty after 12:00 noon New York City
time on a given  Business  Day or on any day that is not a Business Day shall be
deemed  to have been  received  by  Financial  Guaranty  on the next  succeeding
Business Day. If any notice received by Financial Guaranty is not in proper form
or is otherwise insufficient for the purpose of making a claim under this Surety
Bond,  it will be deemed not to have been  received by Financial  Guaranty,  and
Financial  Guaranty  will  promptly  so advise the  Indenture  Trustee,  and the
Indenture  Trustee may submit an amended Notice.  All payments made by Financial
Guaranty  hereunder in respect of Preference Amounts will be made with Financial
Guaranty's own funds.

This Surety Bond is non-cancelable for any reason,  including  nonpayment of any
premium.  The  premium on this  Surety  Bond is not  refundable  for any reason,
including the payment of any Class A Notes prior to their respective maturities.
This Surety Bond shall  expire and  terminate  without any action on the part of
Financial  Guaranty or any other Person on the date that is the later of (i) the
date that is one year and one day  following the date on which the Class A Notes
shall have been paid in full and (ii) if any insolvency  proceeding with respect
to which the Depositor is the debtor has been  commenced on or prior to the date
specified  in  clause  (i)  above,  the 30th  day  after  the  entry of a final,
non-appealable order in resolution or settlement of such proceeding.

A monthly  premium  shall be due and  payable  in  arrears  as  provided  in the
Indenture and the Insurance Agreement.

This Surety Bond is subject to and shall be governed by the laws of the State of
New York.  The proper  venue for any action or  proceeding  on this  Surety Bond
shall be the County of New York,  State of New York.  The insurance  provided by
this  Surety  Bond is not  covered by the New York  Property/Casualty  Insurance
Security Fund (New York Insurance Code, Article 76).

"Notice"  means a written notice in the form of Exhibit A to this Surety Bond by
registered or certified mail or telephonic or telegraphic  notice,  subsequently
confirmed by written notice delivered via telecopy,  telex or hand delivery from
the Indenture Trustee to Financial Guaranty specifying the information set forth
therein. "Holder" means, as to a particular Class A Note, the person, other than

<PAGE>

the issuer,  who, on the applicable Payment Date, is entitled under the terms of
such Class A Note to a  distribution  thereon.  "Indenture"  means the Indenture
relating  to the Class A Notes by and  between  GMACM  Home  Equity  Loan  Trust
2002-HE1, as Issuer, and Wells Fargo Bank Minnesota, N.A., as Indenture Trustee,
dated as of March  27,  2002.  "Insurance  Agreement"  means the  Insurance  and
Indemnity Agreement, among Financial Guaranty, GMAC Mortgage Corporation, Walnut
Grove Mortgage Loan Trust 2001-A,  Residential  Asset Mortgage  Products,  Inc.,
GMACM Home Equity Loan Trust 2002-HE1,  and the Indenture  Trustee,  dated as of
March 27, 2002.  "Servicing Agreement" means the Servicing Agreement relating to
the Class A Notes by and among GMAC  Mortgage  Corporation,  as Servicer,  GMACM
Home Equity Loan Trust 2002-HE1, as Issuer, and the Indenture Trustee,  dated as
of March 27, 2002.

In the event  that  payments  under any  Class A Note are  accelerated,  nothing
herein  contained  shall  obligate  Financial  Guaranty  to make any  payment of
principal or interest on such Class A Note on an accelerated basis,  unless such
acceleration of payment by Financial Guaranty is at the sole option of Financial
Guaranty;  it being  understood  that a  payment  shortfall  in  respect  of the
redemption  of any Class A Note by reason of the  repurchase of the Trust Estate
pursuant  to  Section  8.08  of the  Servicing  Agreement  does  not  constitute
acceleration for the purposes hereof.

IN WITNESS WHEREOF, Financial Guaranty has caused this Surety Bond to be affixed
with its  corporate  seal and to be signed  by its duly  authorized  officer  in
facsimile to become  effective and binding upon Financial  Guaranty by virtue of
the countersignature of its duly authorized representative.

/s/ Deborah M. Reif                                   /s/ A.Edward Turi, III

President                                            Authorized Representative

Effective Date: March 27, 2002

<PAGE>

                                    EXHIBIT A

                              NOTICE OF NONPAYMENT
                    AND DEMAND FOR PAYMENT OF INSURED AMOUNTS

 To:            Financial Guaranty Insurance Company
               125 Park Avenue
               New York, New York 10017
               (212) 312-3000
               Attention:  General Counsel

               Telephone:  (212) 312-3000
               Telecopier:  (212) 312-3220

 Re:           GMACM Home Equity Loan-Backed Term Notes,
               Series 2002-HE1, Class A-1 and Class A-2,
               (together, the "Class A Notes")

               Policy No. 03020009 (the "Surety Bond")

Payment Date:  ___________________________

We refer to that certain  Indenture,  dated as of March 27, 2002, by and between
GMACM  Home  Equity  Loan  Trust  2002-HE1,  as  Issuer,  and Wells  Fargo  Bank
Minnesota,  N.A., as Indenture Trustee (the "Indenture"),  relating to the above
referenced Class A Notes. All capitalized  terms not otherwise defined herein or
in the Surety  Bond shall have the same  respective  meanings  assigned  to such
terms in the Indenture.

(a)  The Indenture Trustee has determined under the Indenture that in respect of
     the Payment Date:

        (1)    The insured  portion of the  distribution on the Class A Notes in
               respect  of the  Payment  Date  that  is due  to be  received  on
               ________________    under    the    Indenture,    is   equal   to
               $_________________, consisting of

               (A)    $______________  in  respect  of  interest  on the Class A
                      Notes, which is calculated as the amount by which:

                      (i)    $_______________, constituting the aggregate amount
                             of accrued interest on the Class A Notes, excluding
                             any Relief Act  Shortfalls,  for the Payment  Date;
                             exceeds

                      (ii)   $_______________,   representing   the   amount  on
                             deposit in the Note Payment  Account  available for
                             interest  distributions to the Class A Notes on the
                             Payment Date; plus

               (B)  $_______________  in  respect  of  principal  of the Class A
                    Notes, which is calculated as the amount by which
<PAGE>

                    (i)  Liquidation  Loss  Amounts with respect to the Mortgage
                         Loans   for   the    Payment    Date,    which    total
                         $______________, exceed

                      (ii)   the sum of

                    (x)  $___________,   representing   the   Liquidation   Loss
                         Distribution Amount for the Payment Date; and

                    (y)  $____________, representing the amount of the reduction
                         in the  Overcollateralization  Amount  for the  Payment
                         Date.

          (2)  [The amount to be paid to the Holders of the Class A Notes on the
               Final  Payment   Date,   which  occurs  on   ______________,   is
               $______________.]

        (3)    The  amounts   available  in  the  Note  Payment  Account  to  be
               distributed on such Payment Date on the Class A Notes pursuant to
               the Indenture in payment of the items identified in items (1) and
               (2)  above,  as  reduced  by any  portion  thereof  that has been
               deposited  in the Note  Payment  Account but may not be withdrawn
               therefrom  pursuant  to an order of a  United  States  bankruptcy
               court of  competent  jurisdiction  imposing  a stay  pursuant  to
               Section  362  of  the  United   States   Bankruptcy   Code),   is
               $______________________.

         Please be advised that, accordingly, a Deficiency Amount exists for the
  Payment  Date  identified  above  for  the  Class  A Notes  in the  amount  of
  $_____________.  This Deficiency Amount  constitutes an Insured Amount payable
  by the Insurer under the Surety Bond.

 [In addition, attached hereto is a copy of the Final Order in connection with a
 Preference Amount in the amount set forth therein,  together with an assignment
 of rights and appointment of agent and other  documents  required by the Surety
 Bond in respect of Preference  Amounts.  The amount of the Preference Amount is
 $_______________.  This Preference Amount constitutes an Insured Amount payable
 by the Insurer under the Surety Bond.]

 Accordingly, pursuant to the Indenture, this statement constitutes a notice for
 payment of an Insured  Amount by the  Insurer in the amount of  $______________
 under the Surety Bond.

(b)  No payment  claimed  hereunder is in excess of the amount payable under the
     Surety Bond.

The  amount requested in this Notice should be paid to: [Payment Instructions]

Any person who  knowingly  and with intent to defraud any  insurance  company or
other person files an application for insurance or statement of claim containing
any  materially  false  information  or conceals for the purpose of  misleading,
information concerning any fact material thereto, commits a fraudulent insurance
act,  which is a crime,  and shall  also be subject  to a civil  penalty  not to
exceed Five Thousand  Dollars  ($5,000.00) and the stated value of the claim for
each such violation.
<PAGE>

        IN WITNESS  WHEREOF,  the  Indenture  Trustee has executed and delivered
this  Notice of  Nonpayment  and Demand for  Payment  of  Insured  Amounts  this
________ day of__________________.

                          __________________________________________,
                         as Indenture Trustee

                         By:
                              -----------------------------------------

                         Title:
                                 --------------------------------------

<PAGE>

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00037-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00037-of-00352.parquet"}]]