The question before us in this appeal is whether an agreement calling for the payment of alimony is avoidable by the spouse obligated to make the payment when his former spouse cohabits with a member of the opposite sex. We find that the agreement before us is not avoidable and therefore affirm.
The parties were married on May 12, 1976 and a divorce complaint was filed by appellee wife on January 16, 1981. Following conciliation the parties reached an agreement which is contained in the following consent order:
After conference with all parties, it is hereby ordered, adjudged and decreed that defendant shall pay to plaintiff alimony in the amount of $325.00 per month for 18 months to begin immediately. In consideration, plaintiff will withdraw her claim for equitable distribution of property and counsel fees. The parties agree that this order constitutes a full settlement of all claims between the parties and that the within alimony award is not subject to modification. Wage attachment dissolved. Arrearages are set at $450.00 to be paid off at $75.00 per month. Both parties, and their counsel signed the consent order.
When appellant ceased to make payments, appellee sought enforcement and hearings were held by a hearing officer who made the factual finding that Mrs. VanKirk had cohabited with a man from October, 1981 to at least September, 1982. It was, however, the hearing officer’s recommendation that Mr. VanKirk’s obligation to make the payments called for in the . agreement was unaffected by that cohabitation.
The trial court dismissed exceptions filed by Mr. VanKirk to the hearing officer’s recommendation and this appeal followed.
*505Appellant contends that his obligation to make what the agreement terms “alimony” payments should cease pursuant to the terms of Section 507 of the Divorce Code.1 That section provides:
§ 507. Bar to any alimony.
No petitioner shall be entitled to receive any award of alimony where such petitioner has entered into cohabitation with a person of the opposite sex who is not a member of the petitioner’s immediate family within the degrees of consanguinity subsequent to the divorce pursuant to which alimony is being sought.
The alimony payments in this case, while enforceable as a court order, (See 23 P.S. 501(f)), are not the result of an “award” of alimony by the court, but rather are the result of an agreement between the parties. The court did not enter an alimony award pursuant to the terms of Section 501 of the Act; it merely agreed to the entry of an order that reflects the agreement of the parties as to their respective property rights.
In considering appellant’s argument we have been guided by the following well-established principles which were set forth in our opinion in Kleintop v. Kleintop, 291 Pa.Super. 491, 495-496, 436 A.2d 223, 225 (1981):
... [A] property settlement agreement between husband and wife will be enforced by the courts in accordance with the same rules of law applying to determining the validity of contracts generally. 18 P.L.E. Husband and Wives § 21, at p. 47. Next, when construing an agreement involving clear and unambiguous terms, a court need only examine the writing itself to give effect to the understanding. In Re Estate of Breyer, 475 Pa. 108, 115, 379 A.2d 1305, 1309 (1977). Finally, a court must construe the contract only as written and may not modify the plain meaning of the words under the guise of interpretation. Dept. of Transportation v. Acchioni & Canuso, Inc., 14 Pa.Cmwlth. 596, 324 A.2d 828 (1974).
*506The agreement in this case made no provision for the cessation of payments in the event appellee cohabited with a man. In fact, the agreement does not call for the termination of payments in the event of her remarriage. Instead, it clearly provides for payments for eighteen months in exchange for Mrs. VanKirk’s promise not to pursue her claim for equitable distribution. There is no suggestion that appellee did not meet her end of the bargain and we will not permit appellant, who benefited from her promise, to renege on his.
We believe that our decision in the instant case comports with our earlier decision in Litwack v. Litwack, 289 Pa.Super. 405, 433 A.2d 514 (1981) in which we said of Section 507’s proscription against the payment of alimony to one cohabiting with another of the opposite sex: “This section applies to applications for alimony and does not purport to affect private, contractual obligations.” Id., 289 Pa.Superior Ct. at 409, 433 A.2d at 516.
While the Litwack case differs from the present one in that it involved a separation agreement made prior to enactment of the Divorce Code, we believe that the following principles enunciated by the Court in that opinion apply also to this case.
No assertion of fraud or mistake attendant upon the execution of the separation agreement is made. So long as a separation agreement stands unimpeached, the court cannot alter or change a provision for separate maintenance and support of the wife without the consent of both parties ... [AJbsent such impeachment, there is no authority for the court to cancel a contract made by the parties and in its place substitute one which it thinks proper but which as a matter of fact the parties had never assented to.”
Id., 289 Pa.Superior Ct. at 409, 433 A.2d at 516.
In sum, as in Litwack, we must conclude that if the parties had intended the payments to cease upon cohabitation, they could have so provided.
Order affirmed.
. Act of April 2, 1980; P.L. 63, No. 26.