Order, Supreme Court, New York County (Ira Gammerman, J.H.O.), entered February 1, 2007, which granted defendant’s motion for summary judgment dismissing the complaint and denied plaintiffs cross motion for summary judgment, unanimously affirmed, with costs.
The court properly granted defendant cooperative’s motion for summary judgment since the Offering Flan’s authorization of the relocation of the superintendent to an inferior apartment within the building was in violation of the preexisting union contract, to which the Offering Flan was expressly subject. Because the writings were clear and complete, they were to be *522enforced according to their terms, and to impose the requirement on defendant to purchase or lease a comparable apartment to the superintendent would be to improperly rewrite the parties’ agreement (see Vermont Teddy Bear Co. v 538 Madison Realty Co., 1 NY3d 470, 475 [2004]). Dismissal of the complaint was also warranted on the basis that plaintiff sponsor failed to join the superintendent and the union as necessary parties (CPLR 1001 [a]; see Hitchcock v Boyack, 277 AD2d 557, 558 [2000]), and joinder would have been futile in light of the substantively defective complaint. Concur—Lippman, P.J., Andrias, Williams, Buckley and Malone, JJ.