Exhibit 10.33



                             AMENDMENT NO. 5 TO THE
                       MASTER LOAN AND SECURITY AGREEMENT

            Amendment No. 5, dated as of June 29, 2001 (this "Amendment"), to
the Master Loan and Security Agreement, dated as of June 21, 2000 (the "Existing
Loan Agreement", as previously amended and as amended hereby, the "Loan
Agreement"), among American Home Mortgage Corp. and Marina Mortgage Company,
Inc. (each a "Borrower", collectively, the "Borrowers") and Morgan Stanley Dean
Witter Mortgage Capital Inc. (the "Lender").

                                    RECITALS

            The Borrowers and the Lender are parties to the Existing Loan
Agreement. Capitalized terms used but not otherwise defined herein shall have
the meanings given to them in the Existing Loan Agreement.

            The Borrowers and the Lender have agreed, subject to the terms and
conditions of this Amendment, that the Existing Loan Agreement be amended to
reflect certain agreed upon revisions to the terms of the Existing Loan
Agreement.

            Accordingly, the Borrowers and the Lender hereby agree, in
consideration of the mutual premises and mutual obligations set forth herein,
that the Existing Loan Agreement is hereby amended as follows:

            SECTION 1.  Amendments.

            (a) Section 1.01 of the Existing Loan Agreement is hereby amended by
deleting the definition of "California Program Mortgage Loan" in its entirety
and substituting in lieu thereof the following new definition:

            "California Program Mortgage Loan" shall mean an Agency Eligible
            Mortgage Loan that is in strict compliance with the eligibility
            requirements for swap or purchase under a program sponsored by the
            State of California or such other program as the Lender shall
            approve in its sole discretion as set forth in the applicable Agency
            Guide and/or Agency Program."

            (b) Section 1.01 of the Existing Loan Agreement is hereby amended by
deleting the definition of "Collateral Value" and substituting in lieu thereof
the following new definition:

            "`Collateral Value' shall mean, with respect to each Eligible
      Mortgage Loan, the lesser of (a) the Applicable Collateral Percentage of
      the Market Value of such Mortgage loan, and (b) 100% of the outstanding
      principal balance of such Mortgage Loan; provided, that the following
      additional limitations shall apply:

<PAGE>

                  (i) The aggregate Collateral Value of all Alternate `A'
            Mortgage Loans included in the Borrowing base at any time shall not
            exceed 25% of the Maximum Credit at such time;

                  (ii) The aggregate Collateral value of all California Program
            Mortgage Loans included in the Borrowing Base at any time shall not
            exceed $20,000,000; and

                  (iii) Collateral value shall be deemed to be zero with respect
            to each Mortgage Loan:

                        (1) in respect of which there is a breach of a
                  representation and warranty set forth on Schedule 1 (assuming
                  each representation and warranty is made as of the date
                  Collateral value is determined),

                        (2) in respect of which there is a delinquency in the
                  payment of principal and/or interest which continues for a
                  period in excess of 30 days (without regard to applicable
                  grace periods),

                        (3) which remains pledged to the Lender hereunder later
                  than 180 days after the date on which it is first included in
                  the Collateral,

                        (4) which has been released from the possession of the
                  Custodian under the Custodial Agreement for a period in excess
                  of 18 days, or

                        (5)   which exceeds the limitation on Collateral value
                  set forth in (i) and (ii) above.

            (c) Section 1.01 of the Existing Loan Agreement is hereby amended by
deleting the definition of "Termination Date" in its entirety and substituting
in lieu thereof the following new definition:

            "`Termination Date' shall mean June 21, 2002 or such earlier date on
      which this Loan Agreement shall terminate in accordance with the
      provisions hereof or by operation of law."

            (d) Section 2.06(b) of the Existing Loan Agreement is hereby amended
by inserting the phrase "via facsimile or electronic mail" immediately following
the word "deliver" in the second sentence thereof.

            (e) Section 7.01 of the Existing Loan Agreement is hereby amended by
(i) relettering clauses "(a)", "(b)", "(c)" and "(d)" to "(b)", "(c)", "(d)" and
"(e)" and (ii) inserting the following new clause (a):

            "(a) as soon as available, and in any event not later than 45 days
      after the end of each calendar month, the unaudited balance sheet of the
      Borrowers as at the end of such month and the related unaudited statement

<PAGE>

      of income of the Borrowers for such month and the portion of the fiscal
      year through the end of such month;"

            (f) Part I of Schedule 1 to the Existing Loan Agreement is hereby
amended by deleting clause (o) in its entirety and substituting in lieu thereof
the following new clause (o):

            "(o) LTV. No Mortgage loan (other than an Alternate `A' Mortgage
      Loan, Agency Eligible Mortgage Loan, California Program Mortgage Loan,
      Conduit Eligible Mortgage Loan or Jumbo Mortgage Loan) has an LTV greater
      than 80%. No Alternate `A' Mortgage Loan has an LTV greater than 90%. No
      Agency Eligible Mortgage Loan (other than California Program Mortgage
      Loans) has an LTV greater than 97%, no California Program Mortgage Loan
      has an LTV greater than 100% and no Conduit Eligible Mortgage Loan has an
      LTV greater than 90%; provided, that with respect to each Agency Eligible
      Mortgage Loan and each California Program Mortgage Loan with an LTV
      greater than 80% the excess over 80% is and will be insured as to payment
      defaults by a PMI Policy until the LTV of such Mortgage Loan is reduced to
      80%. With respect to each Jumbo Mortgage Loan with an LTV greater than
      80%, the excess over 80% is and will be insured as to payment defaults by
      a PMI Policy until the LTV of such Mortgage Loan is reduced to 80%."

            (g) Part I of Schedule 1 to the Existing Loan Agreement is hereby
amended by deleting clause (qq) in its entirety and substituting in lieu thereof
the following new clause (qq):

            "(qq) Withdrawn Mortgage Loans. If the Mortgage Loan has been
      released to any Borrower pursuant to a Request for Release as permitted
      under Section 5 of the Custodial Agreement, then the promissory note
      relating to the Mortgage Loan was returned to the Custodian within 18 days
      (or if such eighteenth day was not a Business Day, the next succeeding
      Business Day)."

            SECTION 2. Amendment Fee. The Borrowers shall pay, jointly and
severally, to the Lender on or prior to the Amendment Effective Date (as defined
below) an amendment fee in the amount of $112,500 (the "Amendment Fee"); such
payment to be made in Dollars, in immediately available funds, without
deduction, set-off or counterclaim, to the Lender at the account set forth in
Section 3.01(a) of the Loan Agreement.

            SECTION 3. Conditions Precedent. This Amendment shall become
effective on the date (the "Amendment Effective Date") on which the following
conditions precedent shall have been satisfied:

            3.1 Delivered Documents. On the Amendment Effective Date, the Lender
shall have received the following documents, each of which shall be satisfactory
to the Lender in form and substance:

            (a) Amendment. This Amendment, executed and delivered by a duly
authorized officer of each Borrower and the Lender;

<PAGE>

            (b) Legal Opinion. A legal opinion of counsel to the Borrowers in
form and substance satisfactory to the Lender;

            (c) Organizational Documents. Certified copies of the charter and
by-laws (or equivalent documents) of each Borrower or a certificate of each
Borrower certifying that there has been no change to any organizational document
previously delivered to the Lender and certified copies of all resolutions
authorizing the execution, delivery and performance of the Loan Documents by
each Borrower;

            (d) Incumbency Certificates. A certificate of each Borrower, dated
the date hereof, as to the incumbency and signature of the officers of such
Borrower executing any Loan Document satisfactory in form and substance to the
Lender;

            (e) Lien Searches. The results of a recent search of the Uniform
Commercial Code, judgment and tax lien filings which may have been filed with
respect to personal property of each Borrower, which results shall be
satisfactory to the Lender; and

            (f) Other Documents. Such other documents as the Lender or counsel
to the Lender may reasonably request.

            3.2 No Default. On the Amendment Effective Date, (i) the Borrowers
shall be in compliance with all the terms and provisions set forth in the
Existing Loan Agreement on its part to be observed or performed, (ii) the
representations and warranties made and restated by the Borrowers pursuant to
Section 3 of this Amendment shall be true and complete on and as of such date
with the same force and effect as if made on and as of such date, and (ii) no
Default or Event of Default shall have occurred and be continuing on such date.

<PAGE>

            SECTION 4. Representations and Warranties. Each Borrower hereby
represents and warrants to the Lender that it is in compliance with all the
terms and provisions set forth in the Loan Documents on its part to be observed
or performed, and that no Default or Event of Default has occurred or is
continuing, and hereby confirms and reaffirms the representations and warranties
contained in Section 6 of the Existing Loan Agreement.

            SECTION 5. Limited Effect. Except as expressly amended and modified
by this Amendment, the Existing Loan Agreement shall continue to be, and shall
remain, in full force and effect in accordance with its terms; provided,
however, that reference therein and herein to the "Loan Documents" shall be
deemed to include, in any event, (i) the Existing Loan Agreement, (ii) the
Amendment to the Master Loan and Security Agreement, dated as of August 21,
2000, (iii) Amendment No. 2 to the Master Loan and Security Agreement, dated as
of September 15, 2000, (iv) Amendment No. 3 to the Master Loan and Security
Agreement, dated as of June 22, 2001, (v) Amendment No. 4 to the Master Loan and
Security Agreement, dated as of June 26, 2001, (vi) the Note, (vii) the
Custodial Agreement and (viii) the Parent Guarantee. Each reference to the Loan
Agreement in any of the Loan Documents shall be deemed to be a reference to the
Loan Agreement as amended hereby.

            SECTION 6. Counterparts. This Amendment may be executed by each of
the parties hereto on any number of separate counterparts, each of which shall
be an original and all of which taken together shall constitute one and the same
instrument.

            SECTION 7. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND
CONSTRUED IN ACCORDANCE WITH, THE LAW OF THE STATE OF NEW YORK WITHOUT REFERENCE
TO THE CHOICE OF LAW PROVISIONS THEREOF.

<PAGE>



            IN WITNESS WHEREOF, the parties hereto have caused this Amendment to
be duly executed and delivered as of the day and year first above written.

                                       BORROWER
                                       --------

                                       AMERICAN HOME MORTGAGE CORP.

                                       By: /s/ Richard Silver
                                          ----------------------------
                                          Name: Richard Silver
                                          Title: Senior Vice President


                                       MARINA MORTGAGE COMPANY, INC.

                                       By: /s/ Richard Silver
                                          ----------------------------
                                          Name: Richard Silver
                                          Title: Senior Vice President

<PAGE>



                                       LENDER
                                       ------

                                       MORGAN STANLEY DEAN WITTER
                                       MORTGAGE CAPITAL INC.

                                       By: /s/ Marc Flamino
                                          --------------------------
                                          Name: Marc Flamino
                                          Title: Vice President