OPINION OF THE COURT
Pine, J. P. Pursuant to a settlement agreement executed by the parties in October 1984 that was incorporated but not merged in their 1985 judgment of divorce, plaintiff was to receive income and earnings of $500 per week pursuant to an attached shareholders agreement relating to Parker Fabric Corporation (Parker); defendant was the majority shareholder in that corporation. *9The settlement agreement provided that, as long as it remained in effect, plaintiff would waive any claim for maintenance. When the corporation was sold in 1988, defendant became an employee of Parker. The parties then entered into a modification agreement wherein defendant agreed to pay plaintiff $500 per week in maintenance for as long as he was "working.” According to defendant, his employment at Parker was terminated in October 1990. In December 1990, he founded another business that he alleges may have to be liquidated for lack of revenue.
In March 1991, plaintiff moved for maintenance arrears in the amount of $11,243.75 and on April 16, 1991, defendant cross-moved for a downward modification of his support obligation, both pursuant to the terms of the modification agreement. The court found the modification agreement unconscionable, terminated defendant’s maintenance obligation after April 16, 1991 (the date of defendant’s cross motion), and awarded plaintiff arrears to that date.
Plaintiff thereafter moved to reargue, asserting that the order should be vacated so that the parties could commence an action on the agreement. The court granted reargument, and upon reargument, nunc pro tunc sua sponte incorporated the modification agreement into the divorce decree, excluding that portion of the agreement relating to maintenance after April 16, 1991. In a written decision, the court, in the alternative, stated that it converted "the action from a post-matrimonial action, to a plenary contract action” and "finds the same result.”
The court erred in incorporating the modification agreement into the judgment of divorce nunc pro tunc for the implicit purpose of modifying the terms of the agreement.
The court did not refer to a modified or amended judgment; in purporting to incorporate the modification agreement nunc pro tunc into the judgment, it apparently intended to evaluate the modification agreement by the criteria applicable to a prejudgment agreement set forth in Domestic Relations Law § 236 (B) (3). Those criteria cannot apply to a postjudgment agreement, however, because the criteria include that the terms of the agreement are not unconscionable at the time of the entry of final judgment. The circumstances that gave rise to the modification agreement made three years after the final judgment had not yet occurred at the time of the final judgment so unconscionability at that time cannot be addressed.
*10Had the court intended to modify the judgment, it would still have been in error. Modification of a judgment under Domestic Relations Law § 236 (B) is provided for in section 236 (B) (9) (b). The statute provides that the standard for modification of maintenance when initially determined by the court is a showing of the recipient’s inability to be self-supporting or a substantial change in circumstance, including financial hardship. The statute sets forth a more stringent standard, however, where a separation agreement remains in force: no modification of a prior order or judgment incorporating the terms of the agreement shall be made with respect to maintenance without a showing of extreme hardship on either party, in which event the judgment or order as modified shall supersede the terms of the prior agreement and judgment for such period of time and under such circumstances as the court determines.
Factually, this case does not fit either alternative. The initial treatment of maintenance was pursuant to an agreement of the parties incorporated in the judgment, so the first set of criteria are inapplicable. It cannot be said that the initial agreement remains in force qua agreement when it has been replaced by a modification agreement. In any event, the criterion of unconscionability applied by the court is not a ground for modification; it relates to whether the agreement should be incorporated in the judgment in the first instance.
Despite the absence of explicit authority in Domestic Relations Law § 236 (A) or (B) for incorporation of a postdivorce agreement into a decree, Foster, Freed and Brandes suggest that that is possible (2 Foster, Freed and Brandes, Law and the Family New York § 5:7 [2d ed]). It has apparently been done when both parties agreed (see, Hoops v Hoops, 292 NY 428, 431). No authority has been found where that has been done over the opposition of one of the parties. Indeed, this Court has held that an application to modify a judgment under Domestic Relations Law § 236 (now section 236 [A]) is addressed to the discretion of the court; we upheld Supreme Court’s refusal to modify the judgment in accordance with the terms of an agreement entered into by the parties, after the entry of judgment, to reduce alimony and child support (Pozzobon v Pozzobon, 54 AD2d 1127). This Court noted that the parties may not by contract divest the court of the power to modify judgments of divorce, citing Kraunz v Kraunz (293 NY 152, 156).
There is no legal impediment to the formerly married *11parties entering into a contract (2 Foster, Freed and Brandes, Law and the Family New York § 5:7 [2d ed]). Usual contract rules apply in determining whether the contract was valid at its inception.
With respect to the relief sought by plaintiff, enforcement of the modification agreement, the appropriate vehicle is a plenary action to enforce that contract (see, e.g., Baker v Baker, 66 NY2d 649, 651; Petritis v Petritis, 131 AD2d 651, 652-653). With respect to the relief sought by defendant, alternatively construction of the contract (see generally, 22 NY Jur 2d, Contracts, § 187 et seq.), a declaration that the contract is unconscionable and therefore unenforceable ab initio (see generally, 21 NY Jur 2d, Contracts, §74), or an order modifying it, the appropriate vehicle with respect to the first two forms of relief also is an action concerning the contract. Modification by the court is, of course, not legally available in a contract action (see, Rodolitz v Neptune Paper Prods., 22 NY2d 383, 386-387; see also, 22 NY Jur 2d, Contracts, §§ 190, 411).
We conclude that the court properly converted the "action” (which was actually a motion) to a plenary action. In so concluding, we note that courts in the interest of judicial economy ought to cure procedural defects and reach the merits of cases before them if they can do so without prejudice to either party. That was the case here. That part of the court’s decision that alternatively converted the "action” to a plenary action on the contract did not become part of the order, which referred only to the incorporation of a portion of the modification agreement into the divorce decree. We therefore correct that discrepancy sua sponte (see, Rowlee v Dietrich, 88 AD2d 751, 752). Further, we treat the motion and cross motion as motions for summary judgment.
On the merits, however, we conclude that the court applied an inappropriate standard when it modified the agreement, which it lacked the power to do in an action on the contract. We conclude that, as a matter of law, defendant’s allegations do not establish that the agreement is unenforceable. Thus, the court erred in finding the agreement unenforceable after April 16, 1991; the court should have upheld it. Defendant argues that the agreement lacked consideration and is unconscionable. We disagree. As stated by the Court in Mandel v Liebman (303 NY 88, 93) in discussing the legal test for unconscionability, "It is commonplace, of course, that adult persons, suffering from no disabilities, have complete freedom *12of contract and that the courts will not inquire into the adequacy of the consideration.” The Court further noted (supra, at 93-94) that the courts nevertheless "sometimes look to the adequacy of the consideration in order to determine whether the bargain provided for is so grossly unreasonable or unconscionable in the light of the mores and business practices of the time and place as to be unenforcible [sic] according to its literal terms [citation omitted]. It has been suggested that an unconscionable contract is one ' "such as no man in his senses and not under a delusion would make on the one hand, and as no honest or fair man would accept, on the other” ’ [citations omitted].” The modification agreement here more than survives that test (see also, Christian v Christian, 42 NY2d 63, 71).
Defendant also argues, however, that he was not "working” within the meaning of the modification agreement. He asserted in an affidavit that "working” meant "working at Parker” and that he cannot be deemed to have been "working” after his termination from Parker because he thereafter was not engaged in gainful employment. Plaintiff averred that "working” was not restricted to Parker. The court never addressed that argument, having found the modification agreement unconscionable. We conclude that, because the term "working” is indeed ambiguous, "and determination of the intent of the parties depends on the credibility of extrinsic evidence or on a choice among reasonable inferences to be drawn from extrinsic evidence,” then that determination is for the trier of fact (Hartford Acc. & Indem. Co. v Wesolowski, 33 NY2d 169, 172; see, Aronson v Riley, 59 NY2d 770, 773).
Accordingly, the order entered following reargument should be modified to provide that the motion and cross motion are converted to a plenary action, that the motion and cross motion are treated as motions for summary judgment, and that the modification agreement is not unconscionable.
Lawton, Fallon, Doerr and Davis, JJ., concur.
Order unanimously modified, on the law, and as modified, affirmed, without costs, in accordance with the opinion by Pine, J. P.