EXECUTION COPY



                   RESIDENTIAL ASSET MORTGAGE PRODUCTS, INC.,

                                  as Purchaser,

                           GMAC MORTGAGE CORPORATION,

                                   as Seller,

                       GMACM MORTGAGE LOAN TRUST 2002-GH1,

                                   as Issuer,

                                       and

                         BANK ONE, NATIONAL ASSOCIATION,

                              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 Mortgage Loans............................................3

        Section 2.2       Payment of Purchase Price.........................................5

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

        Section 3.1       Seller Representations and Warranties.............................6

ARTICLE IV        SELLERS' COVENANTS.......................................................15

        Section 4.1       Covenants of the Sellers.........................................15

ARTICLE V         SERVICING................................................................16

        Section 5.1       Servicing........................................................16

ARTICLE VI        INDEMNIFICATION BY THE SELLER WITH RESPECT TO THE MORTGAGE LOANS.........16

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

ARTICLE VII       TERMINATION..............................................................16

        Section 7.1       Termination......................................................16

ARTICLE VIII      MISCELLANEOUS PROVISIONS.................................................16

        Section 8.1       Amendment........................................................16

        Section 8.2       GOVERNING LAW....................................................16

        Section 8.3       Notices..........................................................17

        Section 8.4       Severability of Provisions.......................................17

        Section 8.5       Relationship of Parties..........................................18

        Section 8.6       Counterparts.....................................................18

        Section 8.7       Further Agreements...............................................18

        Section 8.8       Intention of the Parties.........................................18

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

        Section 8.10      Survival.........................................................19

EXHIBIT 1         MORTGAGE LOAN SCHEDULE..........................................Exhibit 1-1

EXHIBIT 2         MORTGAGE FILES WITH MISSING DOCUMENTS...........................Exhibit 2-1

</TABLE>

<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"),  Witmer Funding LLC, as seller
("Witmer"  and,  together  with GMACM,  each a "Seller"  and  collectively,  the
"Sellers")  Residential  Asset  Mortgage  Products,   Inc.,  as  purchaser  (the
"Purchaser"),  GMACM Mortgage Loan Trust 2002-GH1, as issuer (the "Issuer"), and
Bank One, National Association, as indenture trustee (the "Indenture Trustee").


                                   WITNESSETH:

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

        WHEREAS,  GMACM  sold a  portion  of the  Mortgage  Loans  (the  "Witmer
Mortgage Loans"), to Witmer,  pursuant to the Amended and Restated Mortgage Loan
Purchase and Servicing Agreement (the "Witmer Purchase Agreement"),  dated as of
January 15, 2002,  among Witmer,  as purchaser,  GMACM,  as seller and servicer,
GMAC  Bank,  as seller,  and GMAC  Residential  Holding  Corp.,  as  performance
guarantor (each date of sale, a "Prior Transfer Date");

        WHEREAS,  GMACM owns the Cut-off Date Principal Balances for the portion
of Mortgage Loans identified on the Mortgage Loan Schedule  attached as Schedule
I-A hereto (the "GMACM Mortgage Loans");

     WHEREAS,  Witmer owns the  Cut-off  Date  Principal  Balances of the Witmer
Mortgage Loans identified on the Mortgage Loan Schedule attached as Schedule I-B
hereto (the "Witmer Mortgage Loans");

        WHEREAS, the parties hereto desire that: (i) GMACM sell the Cut-off Date
Principal  Balances of the GMACM  Mortgage Loans to the Purchaser on the Closing
Date pursuant to the terms of this  Agreement,  and (ii) Witmer sell the Cut-off
Date  Principal  Balances of the Witmer  Mortgage  Loans to the Purchaser on the
Closing Date pursuant to the terms of this Agreement;

        WHEREAS,  the parties  hereto desire that GMACM  continue  servicing the
Witmer Mortgage Loans and the GMACM Mortgage Loans; and

        WHEREAS,  GMACM  has  entered  into  an  Amended  and  Restated  Limited
Liability  Company  Agreement (the "LLC Agreement") dated as of October 31, 2001
with Witmer Member Corp. and Bank One,  National  Association  pursuant to which
GMACM has been  appointed  the  administrator  of Witmer (the  "Administrator"),
pursuant to which GMACM is authorized  to execute  documents on behalf of Witmer
and cause  Witmer to deliver or perform the  obligations  of Witmer set forth in
such documents;

     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;

                                       1
<PAGE>

     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
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.

                                       2
<PAGE>

                                   ARTICLE II

                  SALE OF MORTGAGE LOANS AND RELATED PROVISIONS

Section 2.1    Sale of 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,  and wherever
located:  (i) the GMACM  Mortgage  Loans  (including  the Cut-Off Date Principal
Balances of the GMACM Mortgage Loans), 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  principal  and interest due thereon on or
prior to the Cut-Off Date); (ii) the interest of GMACM in any insurance policies
in respect of the GMACM Mortgage Loans; and (iii) all proceeds of the foregoing.
Such  conveyance  shall be deemed to be made:  with  respect to the Cut-Off Date
Principal  Balances,  as of the Closing Date, subject to the receipt by GMACM of
consideration therefor as provided herein under clause (a) of Section 2.3.

(b) Witmer,  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 Witmer  Mortgage  Loans  (including the Cut-Off Date Principal
Balances of Witmer Mortgage Loans),  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  principal  and interest due thereon on or
prior to the  Cut-Off  Date);  (ii) the  interest  of  Witmer  in any  insurance
policies in respect of the Witmer Mortgage Loans;  and (iii) all proceeds of the
foregoing.  Such  conveyance  shall be deemed to be made:  with  respect  to the
Cut-Off Date Principal Balances,  as of the Closing Date, subject to the receipt
by Witmer of  consideration  therefor as  provided  herein  under  clause (a) of
Section 2.3.

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

(d) In connection  with the conveyance by Witmer of the Witmer  Mortgage  Loans,
Witmer further agrees, at its own expense,  on or prior to the Closing Date with
respect to the  Stated  Principal  Balances  of the Witmer  Mortgage  Loans,  to
indicate in its books and records that the Witmer  Mortgage Loans have been sold
to the  Purchaser  pursuant to this  Agreement,  and to deliver to the Purchaser
true and complete lists of all of the Witmer Mortgage Loans  specifying for each
Witmer  Mortgage Loan (i) its account number and (ii) its Cut-Off Date Principal
Balance. Such lists, which form part of the Witmer Mortgage Loan Schedule, shall
be marked as Exhibit 1-B to this Agreement and are hereby  incorporated into and
made a part of this Agreement.

(e) Except for Missing  Documents  identified in Exhibit 2 hereto, in connection
with the  conveyance  by GMACM of the GMACM  Mortgage  Loans  sold by it and the
conveyance by Witmer of the Witmer  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


                                       3
<PAGE>

Closing Date, the original  Mortgage Note 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  Mortgage  Note has been
permanently  lost or destroyed and has not been replaced,  a Lost Note Affidavit
and (B) except as provided in clause (A) with respect to the Mortgage  Notes and
except  for  Missing  Documents  identified  in  Exhibit 2 hereto,  deliver  the
Mortgage Files to the Servicer.

        Within the time period for the review of each Mortgage Note set forth in
Section 2.2 of the  Custodial  Agreement,  if a material  defect in any Mortgage
Note 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 or the  Certificateholders in such Mortgage
Loan,  including  the Seller's  failure to deliver any  document  required to be
delivered to the Custodian on behalf of the Indenture Trustee (provided,  that a
Mortgage  Note will not be deemed to contain a defect if it is listed on Exhibit
2 hereto and the defect related thereto is a Missing Document), 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,  provided  that a Seller  shall have the
option to  substitute  an Eligible  Substitute  Mortgage  Loan or Loans for such
Mortgage Loan only if such  substitution  occurs within two years  following the
Closing Date.

        Notwithstanding   anything  contained  herein,  the  related  Seller  or
Servicer  shall not be  required  to  repurchase  any  Mortgage  Loan due to the
failure to deliver to the Custodian any Missing Documents.  However,  the Seller
will be  required  to  repurchase  any such  Mortgage  Loan if: (i)  foreclosure
proceedings  have been commenced with respect to such Mortgage Loan and (ii) the
failure to possess a Missing Document described under the definition of Mortgage
File (I)(i),  (ii),  (iii),  (iv), (vi) or (II) materially and adversely affects
the Servicer's ability to foreclose on the related Mortgage Loan or to establish
the full amount of principal and interest  owing on the related  Mortgage  Note.
Exhibit 2 hereto shall be delivered by GMACM to the Indenture  Trustee not later
than 30 days from the Closing Date.

        Upon sale of the Mortgage  Loans,  the ownership of each Mortgage  Note,
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  Mortgage  Loans  that are  prepared  by or that  come  into the
possession  of either  Seller as seller of the  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 Witmer and retained and
maintained  in trust by GMACM as the Servicer  (except for the  Mortgage  Notes,
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 Mortgage Loan sold by it to the Purchaser.

        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


                                       4
<PAGE>

by the  Sellers  to the  Purchaser  of each of the  Sellers'  right,  title  and
interest in and to their respective  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,  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 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 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 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 Loans have 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    Payment of Purchase Price.
               -------------------------

(a) The sale of the Mortgage Loans shall take place on the Closing Date, subject
to and  simultaneously  with the  deposit of the  Mortgage  Loans into the Trust
Estate and the issuance of the  Securities.  The purchase  price (the  "Purchase
Price") for the GMACM Mortgage Loans to be paid by the Purchaser to GMACM on the
Closing  Date  shall  be an  amount  equal  to  $355,072,732.47  in  immediately
available funds, together with the Certificates,  in respect of the Cut-Off Date
Principal Balances thereof.  The Purchase Price for the Witmer Mortgage Loans to
be paid by the  Purchaser to Witmer on the Closing Date shall be an amount equal
to $109,881,441.06 in immediately available funds in respect of the Cut-Off Date
Principal Balances thereof.

(b) In  consideration  of the sale of the GMACM  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


                                       5
<PAGE>

designated by GMACM,  the amount  specified above in paragraph (a) for the GMACM
Mortgage  Loans;  provided,  that such payment may be on a net funding  basis if
agreed by GMACM and the Purchaser.

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

                                  ARTICLE III

                         REPRESENTATIONS AND WARRANTIES;
                               REMEDIES FOR BREACH

Section 3.1 Seller Representations and Warranties. GMACM represents and warrants
to the Purchaser, as of the Closing 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 all of the transactions  contemplated under
this Agreement,  and has taken all necessary  corporate  action to authorize the
execution, delivery and performance of this 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, 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 by GMACM and its  performance
and  compliance  with the  terms of this  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  that in the opinion of GMACM has a reasonable  likelihood of
resulting in a material adverse effect on the transactions  contemplated by this
Agreement;

                                       6
<PAGE>

(vi) This Agreement  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 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 GMACM in and to the GMACM Mortgage
Loans,  including the Cut-Off Date Principal  Balances with respect to the GMACM
Mortgage Loans,  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
Mortgage Loans; and

(viii)  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  Mortgage  Loan  as of the  Closing  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 Witmer  Mortgage  Loans as of each  respective
Prior Transfer Date: (A) the related Mortgage Note and the Mortgage had not been
assigned or pledged, except for any assignment or pledge that had been satisfied
and released,  (B) immediately prior to the assignment of such Mortgage Loans to
Witmer,  GMACM  had  good  title  thereto  and  (C)  immediately  prior  to such
assignment,  GMACM was the sole owner and holder of the  Mortgage  Loan free and
clear of any and all liens, encumbrances,  pledges, or security interests 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 Witmer Purchase Agreement;

(iii) With respect to each GMACM Mortgage  Loan:  (A) the related  Mortgage Note
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  GMACM has 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 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;

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

                                       7
<PAGE>

(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, not more than 2.93% and 0.58% , respectively,  of
the Mortgage Loans by Cut-Off Date  Principal  Balance are (i) 30 to 59 days, or
(ii)  60-89 days  delinquent  in payment of  principal  or  interest.  As of the
Cut-Off Date,  none of the Mortgage Loans are over 90 days delinquent in payment
of principal or interest

(ix) Except for any Missing Documents, with respect to the GMACM Mortgage Loans,
the related  Mortgage  File  contains,  in  accordance  with the  definition  of
Mortgage File,  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 Mortgage Note 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);

(x) To the best of GMACM's knowledge,  the related Mortgage Note 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, no more than  approximately  13.93% and 12.98% of
the Mortgage  Loans by Cut-Off Date  Principal  Balance are secured by Mortgaged
Properties located in California and Massachusetts, respectively;

(xiv) As of the Cut-Off  Date,  except for  approximately  1.99% of the Mortgage
Loans by Cut-Off Date  Principal  Balance,  the LTV Ratio for each Mortgage Loan
was not in excess of 100.00%;

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

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

                                       8
<PAGE>

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

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

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

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

(xxi) No Mortgage  Loan has an original term to maturity in excess of 372 months
or a maturity date later than February 1, 2033;

(xxii) As of the Cut-Off  Date,  approximately  78.16% of the Mortgage  Loans by
Cut-Off Date Principal  Balance are fixed rate and  approximately  21.84% of the
Mortgage Loans by Cut-Off Date Principal  Balance are adjustable rate. As of the
Cut-Off  Date,  the Loan Rates on the Mortgage  Loans range  between  3.875% per
annum and 13.750%  per annum.  The  weighted  average  remaining  term to stated
maturity of the  Mortgage  Loans as of the  Cut-Off  Date is  approximately  281
months;

(xxiii) (A) Except for the Land Loans,  each  Mortgaged  Property  consists of a
single parcel of real property with a single family or an individual condominium
unit;  (B) Except for the Land Loans,  with  respect to the  Mortgage  Loans (a)
approximately  7.97% (by Cut-Off  Date  Principal  Balance)  are secured by real
property improved by individual  condominium units, (b) approximately 62.96% (by
Cut-Off  Date  Principal  Balance)  are secured by real  property  with a single
family  residence  erected  thereon,  and (c) 9.13% (by Cut-Off  Date  Principal
Balance) are secured by two to four-family properties;

(xxiv) As of the Cut-Off Date no Mortgage Loan had a principal balance in excess
of $2,073,415.50;

(xxv)As of the Cut-Off Date,  the  percentage of Mortgage Loans that are balloon
loans is not in excess of approximately 14.13%;

(xxvi) Each  Mortgage  Loan  constitutes  a "qualified  mortgage"  under Section
860G(a)(3)(A) of the Code and Treasury Regulation Section 1.860G-2(a)(1);

(xxvii)  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 Mortgage  Note 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  Mortgage  Note  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;

(xxviii) 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,  in whole or in part  from its  obligations  in  connection
therewith;

                                       9
<PAGE>

(xxix) The original  Mortgage creates a first lien on an estate in fee simple or
a leasehold  interest in real property  securing the related Mortgage Note, free
and clear of all adverse claims, liens and encumbrances having priority over the
first  lien of the  Mortgage  subject  only to (1)  the  lien of  non-delinquent
current  real  property  taxes  and  assessments  not yet due and  payable,  (2)
covenants,  conditions  and  restrictions,  rights of way,  easements  and other
matters of public  record as of the date of recording  which are  acceptable  to
mortgage  lending  institutions  generally,  and (3) other matters to which like
properties  are commonly  subject  which do not  materially  interfere  with the
benefits of the  security  intended  to be provided by the  Mortgage or the use,
enjoyment, value or marketability of the related Mortgaged Property;

(xxx) 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;

(xxxi) Assuming no prepayments,  delinquencies  or losses on the Mortgage Loans,
the  aggregate  amount  of  principal  that will be  outstanding  upon the final
maturity of the  Mortgage  Loans that (1) result  from  Monthly  Payments  being
insufficient  to fully amortize the Mortgage Loans that are not balloon loans or
(2) had Monthly  Payments applied in a manner that reduced the rate of principal
amortization will not exceed $100,000.00;

(xxxii) The Mortgage Loan is covered by an ALTA lender's title insurance  policy
or other generally  acceptable  form of policy of insurance,  with all necessary
endorsements,  issued  by a  title  insurer  qualified  to do  business  in  the
jurisdiction where the Mortgaged  Property is located,  insuring (subject to the
exceptions  contained  in clause  (xxix)  (1),  (2) and (3)  above)  GMACM,  its
successors  and assigns,  as to the first  priority  lien of the Mortgage in the
original  principal  amount of the Mortgage Loan.  Such title  insurance  policy
affirmatively  insures ingress and egress and against  encroachments  by or upon
the  Mortgaged  Property or any interest  therein.  GMACM is the sole insured of
such lender's title insurance policy,  such title insurance policy has been duly
and validly  endorsed to the  Purchaser or the  assignment  to the  Purchaser of
GMACM's  interest therein does not require the consent of or notification to the
insurer and such lender's title insurance policy is in full force and effect and
will be in full  force and  effect  upon the  consummation  of the  transactions
contemplated  by this  Agreement.  No claims have been made under such  lender's
title insurance policy, and no prior holder of the related Mortgage has done, by
act or omission, anything which would impair the coverage of such lender's title
insurance policy;

(xxxiii) If any of the  Mortgage  Loans are secured by a leasehold  interest the
remaining  term of the lease does not  terminate  less than ten years  after the
maturity date of such Mortgage Loan;

(xxxiv) To the best of GMACM's knowledge,  any escrow  arrangements  established
with respect to any Mortgage Loan are in compliance  with all applicable  local,
state and  federal  laws and are in  compliance  with the terms of the  Mortgage
Note;

                                       10
<PAGE>

(xxxv) If required by the applicable processing style and except for any Missing
Documents,  the Mortgage File contains an appraisal, or land report with respect
to the Land Loans,  of the related  Mortgaged  Property made and signed prior to
the final  approval of the mortgage loan  application  by an appraiser who meets
the minimum  qualifications for appraisers as specified by GMACM's  underwriting
standards;

(xxxvi) To the best of GMACM's knowledge,  if the Mortgage constitutes a deed of
trust,  a trustee,  duly  qualified if required  under  applicable law to act as
such,  has been properly  designated and currently so serves and is named in the
Mortgage, and no fees or expenses are or will become payable by the Purchaser to
the trustee under the deed of trust,  except in connection with a trustee's sale
or attempted sale after default by the Mortgagor;

(xxxvii) The related Mortgage contains enforceable  provisions such as to render
the rights and  remedies  of the holder  thereof  adequate  for the  realization
against the Mortgaged Property of the benefits of the security provided thereby,
including,  (1) in the case of a  Mortgage  designated  as a deed of  trust,  by
trustee's  sale,  and (2)  otherwise  by judicial  foreclosure.  To the Seller's
knowledge,  there is no homestead or other exemption  available to the Mortgagor
which  would  interfere  with  the  right to sell the  Mortgaged  Property  at a
trustee's sale or the right to foreclose the Mortgage;

(xxxviii) Except for the Land Loans, if the Mortgaged  Property is located in an
area  identified by the Federal  Emergency  Management  Agency as having special
flood hazards under the Flood Disaster Protection Act of 1973, as amended,  such
Mortgaged  Property  is covered by flood  insurance  by a  generally  acceptable
insurer in an amount not less than the  requirements  of Fannie Mae and  Freddie
Mac;

(xxxix) (1) The proceeds of each Mortgage Loan have been fully disbursed and (2)
to the best of GMACM's  knowledge,  there is no requirement  for future advances
thereunder  and any and all  requirements  as to  completion  of any  on-site or
off-site  improvements  and as to  disbursements  of any  escrow  funds  thereof
(including and escrow funds held to make Monthly Payments pending  completion of
such  improvements)  have been complied with. All fees and expenses  incurred in
making, closing or recording the Mortgagee Loans were paid;

(xl) No Mortgage  Loan  provides for  payments  that are subject to reduction by
withholding taxes levied by foreign (non-United States) sovereign government;

(xli)  Except for the Land Loans,  each  Mortgage  Loan is covered by a standard
hazard
insurance policy;

(xlii) With respect to a Mortgage Loan that is a Cooperative  Mortgage Loan, the
Cooperative Stock that is pledged as security for the Mortgage Loan is held by a
person as a  tenant-stockholder  (as  defined in  Section  216 of the Code) in a
cooperative housing corporation (as defined in Section 216 of the Code); and

(xliii)  With  respect to each Land Loan,  such loan is secured by land on which
building one- to four- family residential units is permitted.

                                       11
<PAGE>

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

     (c) Witmer  Representations and Warranties.  Witmer represents and warrants
to the Purchaser, as of the Closing Date:

               (i)    As to Witmer:

(i) Witmer is a limited liability  company duly formed,  validly existing and in
good standing under the laws of the State of Delaware;

(ii) Witmer has the power and  authority to make,  execute,  deliver and perform
its obligations  under this Agreement and all of the  transactions  contemplated
under this  Agreement,  and has taken all necessary  limited  liability  company
action to authorize the execution,  delivery and  performance of this Agreement;
this  Agreement  constitutes  a legal,  valid and binding  obligation of Witmer,
enforceable   against   Witmer  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;

(iii) The execution and delivery of this Agreement by Witmer and its performance
and  compliance  with the  terms of this  Agreement  will not  violate  Witmer's
Certificate  of Formation or the LLC Agreement 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 Witmer is a party or which may
be applicable to Witmer or any of its assets;

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

(v) No consent,  approval,  authorization  or order of any court or governmental
agency or body is required for the execution, delivery and performance by Witmer
of or compliance by Witmer with this  Agreement,  the sale of the Mortgage Loans
or the  consummation of the  transactions  contemplated by this Agreement except
for consents, approvals, authorizations and orders which have been obtained;

(vi) The consummation of the  transactions  contemplated by this Agreement is in
the ordinary  course of business of Witmer,  and the  transfer,  assignment  and
conveyance  of the  Mortgage  Notes and the  Mortgages  relating  to the  Witmer
Mortgage  Loans by Witmer  pursuant  to this  Agreement  are not subject to bulk
transfer  or any  similar  statutory  provisions  in  effect  in any  applicable
jurisdiction; and

                                       12
<PAGE>

(vii)  Witmer will treat the sale of the  Mortgage  Loans to the  Purchaser as a
sale for reporting and accounting purposes and, to the extent  appropriate,  for
federal income tax purposes.

               (ii)   As to the Witmer Mortgage Loans:

(i) With respect to the Witmer Mortgage Loans: (A) the related Mortgage Note 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,  Witmer  had good  title
thereto  and (C) Witmer is the sole owner and holder of the  Mortgage  Loan free
and clear of any and all liens, encumbrances,  pledges, or security interests 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)  Except for any  Missing  Documents,  with  respect to the Witmer  Mortgage
Loans, the related Mortgage File contains,  in accordance with the definition of
Mortgage File,  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 Mortgage Note 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) Witmer has not transferred the Witmer 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  Witmer  in
connection with the Witmer Mortgage Loans, and no Mortgagor has been released by
Witmer, 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 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 in any Mortgage Loan,
GMACM or Witmer,  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.

        Upon  discovery  by  either  Seller  or  GMACM or upon  notice  from the
Purchaser,  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 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  or, if such


                                       13
<PAGE>

breach  has the  effect  of making  the  Mortgage  Loan fail to be a  "qualified
mortgage"  within the  meaning of Section  860G of the  Internal  Revenue  Code,
within 90 days after the discovery thereof by either such Seller,  the Servicer,
the Issuer,  the Owner Trustee,  the Indenture Trustee or the Purchaser,  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,  provided that
the Seller shall have the option to substitute an Eligible  Substitute  Mortgage
Loan or Loans for such Mortgage Loan only if such substitution occurs within two
years  following the Closing Date.  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 Mortgage Note, 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.  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 equal to the applicable 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 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.  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 (xiii),  (xxii)
and  (xxiii)(B) and (xxiv) thereof and other than clauses (iii) and (ix) thereof
in the case of Eligible  Substitute  Loans  substituted by Witmer),  and, if the
Seller is Witmer,  Witmer 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


                                       14
<PAGE>

Deleted  Loans,  the  Servicer  shall  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 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  Mortgage  Note 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 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.

        It is understood and agreed that the  representations and warranties set
forth in this  Section 3.1 shall  survive  delivery of the  respective  Mortgage
Notes 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, that 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.  Each Seller shall notify the Issuer (in the case
of the Mortgage Loans,  as assignee of the  Purchaser),  of the existence of any
Lien  (other than as  provided  above) on any  Mortgage  Loan  immediately  upon
discovery thereof;  and the Seller shall defend the right, title and interest of
the Issuer (in the case of the 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 such Seller shall  currently be contesting the
validity thereof in good faith by appropriate Proceedings.

                                       15
<PAGE>

                                   ARTICLE V

                                    SERVICING

Section 5.1  Servicing.  GMACM shall service the Mortgage  Loans pursuant to the
terms and conditions of the Servicing Agreement.

                                   ARTICLE VI

                          INDEMNIFICATION BY THE SELLER
                       WITH RESPECT TO THE MORTGAGE LOANS

Section 6.1  Limitation  on  Liability of the  Sellers.  None of the  directors,
officers, employees or agents of GMACM or Witmer 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.  Except as and to the extent
expressly  provided in the  Servicing  Agreement,  GMACM and Witmer shall not be
under any liability to the Issuer,  the Owner Trustee,  the Indenture Trustee or
the Securityholders.  GMACM, Witmer and any director, officer, employee or agent
of GMACM or Witmer  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),  provided  that the  Servicer  and the
Indenture  Trustee  shall have received an Opinion of Counsel to the effect that
such amendment will not result in an Adverse REMIC Event.

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.

                                       16
<PAGE>

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:

(i)     if to GMACM:

                          GMAC Mortgage Corporation
                          100 Witmer Road
                          Horsham, Pennsylvania  10944
                          Attention: Barry Bier, Senior Vice President
                          Re: GMACM Mortgage Loan Trust 2002-GH1;

(ii)    if to the Purchaser:

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

(iii)   if to the Indenture Trustee:

                          Bank One, National Association
                          1 Bank One Plaza, Suite 1L1-0481
                          Chicago, Illinois 60670-0481
                          Attention:  GMACM Mortgage Loan Trust 2002-GH1;

(iv)    if to the Issuer:

                          c/o Wilmington Trust Company, as Owner Trustee
                          Rodney Square North
                          1100 North Market Street
                          Wilmington, Delaware 19890-0001
                          Re: GMACM Mortgage Loan Trust 2002-GH1; or

(v)     if to Witmer:

                          c/o GMAC Mortgage Corporation
                          100 Witmer Road
                          Horsham, Pennsylvania  10944
                          Attention:Barry Bier, Senior Vice President
                          Re: GMACM Mortgage Loan Trust 2002-GH1;

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.

                                       17
<PAGE>

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 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 Mortgage  Loans,  rather than the Purchaser
providing a loan to the  Sellers  secured by the  Mortgage  Loans on the Closing
Date. Accordingly,  the parties hereto each intend to treat this transaction for
federal  income tax  purposes  as a sale by the  Sellers,  and a purchase by the
Purchaser,  of the Mortgage  Loans on the Closing  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 the
Sellers 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 Purchaser, which consent shall be at
the  Purchaser's  sole  discretion;  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 the Purchaser
is acquiring  the  Mortgage  Loans for the purpose of  contributing  them to the
GMACM Mortgage Loan Trust 2002-GH1.

(b) As an  inducement  to the  Purchaser and the Issuer to purchase the 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 Mortgage Loans
transferred  to the Issuer and to the  enforcement  or  exercise of any right or
remedy against either Seller pursuant to this Agreement by the Issuer,  (ii) the
enforcement or exercise of any right or remedy  against such Seller  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


                                       18
<PAGE>

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  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
Mortgage Loans hereunder.


                                       19
<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:
                        ---------------------------------------
                        Name:
                        Title:


                    GMAC MORTGAGE CORPORATION,
                       as Seller



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


                    WITMER FUNDING LLC, as Seller

                     By: GMAC Mortgage Corporation


                     By:
                        ---------------------------------------
                         Name:  Barry Bier
                         Title:    Executive Vice President



                    GMACM MORTGAGE LOAN TRUST 2002-GH1, as Issuer

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



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


                    BANK ONE, NATIONAL ASSOCIATION., as Indenture
                      Trustee


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



                                       20
<PAGE>


                                    EXHIBIT 1

                             MORTGAGE LOAN SCHEDULE

                        [On File with GMACM and Servicer]





                                       21
<PAGE>



                                    EXHIBIT 2

                      MORTGAGE FILES WITH MISSING DOCUMENTS

                        [On File with GMACM and Servicer]


                                       22
<PAGE>