Unassociated Document


    EXHIBIT
      4.1

    
      


      GS
        MORTGAGE SECURITIES CORP.,

       

      Depositor,

       

      INDYMAC
        BANK, F.S.B.,

       

      Servicer,

       

      AMERICAN
        HOME MORTGAGE SERVICING, INC.,

       

      Servicer,

       

      OCWEN
        LOAN SERVICING, LLC,

       

      Servicer,

       

      WELLS
        FARGO BANK, N.A.,

       

      Master
        Servicer and Securities Administrator,

       

      and

       

      DEUTSCHE
        BANK NATIONAL TRUST COMPANY,

       

      Trustee

       

                                                                           

       

      AMENDMENT
        NO. 3 dated as of

      JANUARY
        25, 2008 TO THE

       

      POOLING
        AND SERVICING AGREEMENT

       

      DATED
        AS
        OF JUNE 1, 2006

       

                                                                          

       

      GSAMP
        TRUST 2006-S4

       

      MORTGAGE
        PASS-THROUGH CERTIFICATES,

       

      SERIES
        2006-S4

       


      
        
          
            


             

          

          
          

        

        
          
          

          
            

          

        

        
          
          

        

      


      AMENDMENT
        NO. 3, dated as of January 25, 2008 (this “Amendment”), among GS MORTGAGE
        SECURITIES CORP., a Delaware corporation (the “Depositor”), INDYMAC BANK,
        F.S.B., a federally chartered savings bank, as a servicer (“IndyMac”), AMERICAN
        HOME MORTGAGE SERVICING, INC., a Maryland corporation, as a servicer (“AHMSI”),
        OCWEN LOAN SERVICING, LLC, a Delaware limited liability company, as a servicer
        (“Ocwen”, and together with IndyMac and AHMSI, the “Servicers”), WELLS FARGO
        BANK, N.A., a national banking association (“Wells Fargo”) as master servicer
        (in such capacity, the “Master Servicer”) and securities administrator (in such
        capacity, the “Securities Administrator”), and DEUTSCHE BANK NATIONAL TRUST
        COMPANY, a national banking association, as trustee (the “Trustee”) in
        connection with the Pooling and Servicing Agreement, dated as of June 1,
        2006
        (the “Agreement”), among the Depositor, the Servicers, the Master Servicer, the
        Securities Administrator and the Trustee.  Capitalized terms not
        defined herein have the meanings assigned to them in the Agreement.

       

      1.           
        This Amendment is effected pursuant to the first paragraph of Section 12.01
        of
        the Agreement.

       

      2.           
        Article I of the Agreement is hereby amended by deleting in its entirety
        the
        definition of “Released Loan” and replacing it with the following:

      


      Released
        Loan: Any Charged Off Loan that is released by the applicable Servicer to
        the
        Class X-1 Certificateholder pursuant to Section 3.15(b). Any Released Loan
        will
        no longer be an asset of any REMIC or the Trust Fund; provided that in
        accordance with the provisions of Section 3.15(b)(ii), any Repurchase Price
        paid
        by Fremont, Indy Mac, American Home or the Purchaser, as applicable, with
        respect to a Released Loan shall be included in Available Funds and treated
        as a
        Subsequent Recovery.

       

      3.           
        Article I of the Agreement is hereby amended by deleting in its entirety
        the
        definition of “Repurchase Price” and replacing it with the
        following:

       

      Repurchase
        Price:  With respect to any Mortgage Loan (including any Released Loan
        in accordance with Section 3.15(b)(ii) hereof) repurchased by the Purchaser,
        an
        amount equal to the sum of (i) the unpaid principal balance of such
        Mortgage Loan as of the date of repurchase, (ii) interest on such unpaid
        principal balance of such Mortgage Loan at the Mortgage Interest Rate from
        the
        last date through which interest has been paid and distributed to the Securities
        Administrator to the date of repurchase, (iii) all unreimbursed Servicing
        Advances, (iv) any costs and damages incurred by the Trust in connection
        with
        any violation by such Mortgage Loan of any predatory lending law or abusive
        lending, and (v) all expenses incurred by the applicable Servicer, the Master
        Servicer, the Trust or the Trustee, as the case may be, in respect of a breach
        or defect, including, without limitation, expenses arising out of any
        Servicer’s, the Master Servicer’s or the Trustee’s, as the case may be,
        enforcement of the Purchaser’s repurchase obligations, to the extent not
        included in clause (iii).  With respect to any Mortgage Loan
        (including any Released Loan in accordance with Section 3.15(b)(ii) hereof)
        repurchased by Fremont, the Repurchase Price as that term is defined in the
        Fremont Purchase Agreement. With respect to any Mortgage Loan (including
        any
        Released Loan in accordance with Section 3.15(b)(ii) hereof) repurchased
        by
        IndyMac, the Repurchase Price as that term is defined in the IndyMac Purchase
        Agreement. With respect to any Mortgage Loan (including any Released Loan
        in
        accordance with Section 3.15(b)(ii) hereof) repurchased by American Home,
        the
        Repurchase Price as that term is defined in the American Home Sale
        Agreement.

       

      4.           
        Article I of the Agreement is hereby amended by deleting in its entirety
        the
        definition of “Subsequent Recovery” and replacing it with the
        following:

      


      Subsequent
        Recoveries:  (a) Amounts received with respect to any Liquidated
        Mortgage Loan after it has become a Liquidated Mortgage Loan and, in the
        case of
        a Charged Off Loan, prior to such Liquidated Mortgage Loan becoming a Released
        Loan or (b) any Repurchase Price paid by Fremont, Indy Mac, American Home
        or the
        Purchaser, as applicable, after a Charged Off Loan becomes a Released Loan
        in
        accordance with Section 3.15(b)(ii) hereof.

       

      5.           
        Article II of the Agreement is hereby amended by deleting in its entirety
        subsection (g) of Section 2.03 and replacing it with the following:

       

      (g)
        In
        the event that a Mortgage Loan (including any Released Loan) shall have been
        repurchased pursuant to this Agreement, the Fremont Agreements, the IndyMac
        Agreements or the American Home Agreements, the Repurchase Price thereof
        shall
        be deposited in the Collection Account by the applicable Servicer pursuant
        to
        Section 3.10 on or before the next Remittance Date and upon such deposit of
        the Repurchase Price, and receipt of a Request for Release in the form of
        Exhibit J hereto, the Trustee shall release the related Custodial File held
        for the benefit of the Certificateholders to such Person as directed by such
        Servicer, and the Trustee shall execute and deliver at such Person’s direction
        such instruments of transfer or assignment prepared by such Person, in each
        case
        without recourse, as shall be necessary to transfer title from the
        Trustee.  It is understood and agreed that the obligation under this
        Agreement of any Person to cure, repurchase or replace any Mortgage Loan
        as to
        which a breach has occurred and is continuing, together with satisfaction
        of any
        related indemnification obligations, shall constitute the sole remedy against
        such Persons respecting such breach available to Certificateholders, the
        Depositor, the Securities Administrator, the Master Servicer, each Servicer
        or
        the Trustee on their behalf.

       

      6.           
        Article III of the Agreement is hereby amended by deleting in its entirety
        subsection (b) of Section 3.15 and replacing it with the following:

      


      (b)(i)     
        With respect to any Mortgage Loan that is 180 days delinquent, the applicable
        Servicer shall charge off such delinquent Mortgage Loan.  Once a
        Mortgage Loan has been charged off, such Servicer will discontinue making
        P&I Advances, such Servicer will not be entitled to any additional servicing
        compensation in respect of such Charged Off Loan and the Charged Off Loan
        will
        give rise to a Realized Loss.  Any such Charged Off Loan will be
        released from the Trust Fund, will no longer be an asset of any REMIC, and
        will
        be transferred to the Class X-1 Certificateholders, without recourse, and
        thereafter, subject to clause (b)(ii) below, (i) the Class X-1 Certificateholder
        will be entitled to any amounts subsequently received in respect of any such
        Released Loan (other than as set forth in clause (b)(ii) below), (ii) the
        Class
        X-1 Certificateholder may designate any servicer to service any such Released
        Loan and (iii) the Class X-1 Certificateholder may sell any such Released
        Loan
        to a third party.  Once a Mortgage Loan is charged off and discharged
        from the Trust pursuant to this Section 3.15(b)(i), the applicable Servicer
        shall not be obligated to service such Mortgage Loan.  The applicable
        Servicer may cease any collection efforts and shall have no further servicing
        obligation with respect to such Mortgage Loan, and statements of account
        may no
        longer be sent to such Mortgagor.  The applicable Servicer shall write
        off each charged off Mortgage Loan as bad debt.

      


      (ii)         
        With respect to any Charged Off Loan that is discharged from the Trust pursuant
        to this Section 3.15(b), in the event that Fremont, Indy Mac, American Home
        or
        the Purchaser, as applicable, repurchases such Charged Off Loan due to a
        breach
        of a representation and warranty made by Fremont, Indy Mac, American Home
        or the
        Purchaser, as applicable, with respect to such Charged Off Loan, or, due
        to an
        early payment default claim (to the extent such claim is held by the Trust)
        with
        respect to such Charged Off Loan, the Repurchase Price paid by Fremont, Indy
        Mac, American Home or the Purchaser, as applicable, shall be deposited in
        the
        Collection Account by the Servicer pursuant to Section 3.10 on or before
        the
        next Remittance Date and included in Available Funds as a Subsequent
        Recovery.

      


      7.           
        Conditions Precedent to this Amendment: The following conditions precedent
        to
        the effectiveness of this Amendment have been fulfilled:

       

      (a)  
          The
        prior
        notice of this Amendment required by Section 12.01 of the Agreement has been
        given by the Depositor to each of the Rating Agencies, currently Standard
&
Poor's, a Division of the McGraw-Hill Companies, Inc. and Moody's Investors
        Service, Inc., and the Trustee hereby acknowledges receipt of copies
        thereof.

       

      (b)       
         The
        opinions of counsel required by Section 12.01 of the Agreement have been
        received by the Trustee, the Master Servicer and the Securities
        Administrator.

       

      8.           This
        Amendment is subject to the terms of the Agreement as modified and supplemented
        herein. The Agreement continues in full force and effect as modified herein
        and
        provided therein.


      
        
           

        

        
           

          
            

          

        

        
           

        

      

      The
        undersigned have executed this Amendment as of the date hereof.

      


      
        	 	
                GS
                  MORTGAGE SECURITIES CORP.,

                as
                  Depositor 

                 

              
	 	
                By:
                  /s/
                  Michelle
                  Gill                                                             

                Name:
                  Michelle Gill

                Title:   Vice
                  President

                 

              
	 	
                DEUTSCHE
                  BANK NATIONAL TRUST COMPANY,

                solely
                  as Trustee and not in its individual capacity

                 

              
	 	
                By:
                  /s/
                  Mei
                  Nghia                                               
                                  

                Name:
                  Mei Nghia

                Title:   Authorized
                  Signer

                 

              
	 	
                By:
                  /s/
                  Manuel
                  Rivas                                                        
                   

                Name:
                  Manuel Rivas

                Title:   Authorized
                  Signer

                 

              
	 	
                WELLS
                  FARGO BANK, N.A.,

                as
                  Master Servicer and Securities Administrator

                 

              
	 	
                By:
                  /s/
                  Kelly M.
                  Daniels                                                   
                   

                Name:
                  Kelly M. Daniels

                Title:   Assistant
                  Vice President

                 

              
	 	
                OCWEN
                  LOAN SERVICING, LLC,

                as
                  Servicer
 


                
                

                By:
                  /s/
                  Richard
                  Delgado                                                    
                   

                Name:
                  Richard Delgado

                Title:   Authorized
                  Representative
 

              
	 	
                AMERICAN
                  HOME MORTGAGE SERVICING, INC.,

                as
                  Servicer
  


                
                

                By:
                  /s/
                  David M.
                  Friedman                                   
                   

                Name:
                  David M. Friedman

                Title:   Executive
                  Vice President

                
                

              


         

        
          
            
            

          

          
            
            

            
              

            

          

          
            
            

          

        

        	 	 
	 	 
	 	
                INDYMAC
                  BANK, F.S.B.,

                as
                  Servicer

                 

                
                

                By:
                  /s/
                  Jill
                  Jacobson                                                           
                   

                Name:
                  Jill Jacobson

                Title:  Vice
                  President

                
                

              


      

      PRIOR
        CONSENT HERETO IS HEREBY

      GIVEN:

       

      GOLDMAN,
        SACHS & CO., as Holder of

      Class
        X-1
        Certificates representing

      a
        100.00%
        Percentage Interest in such Class

       

      By:
/s/
        Greg
        Finck                                                                                                            


      Name:
        Greg Finck

      Title:   Managing
        Director