
365 N.W.2d 552 (1985)
Nancy I. HARRINGTON, Plaintiff and Appellant,
v.
Gerald R. HARRINGTON, the United States of America, acting Through the Farmers Home Administration, Ruth E. Harrington, the Security State Bank of Hannaford, a corporation, and Ellis T. Jackson and Charlotte Jackson, Defendants and Appellees.
Civ. No. 10741.
Supreme Court of North Dakota.
April 1, 1985.
*554 Hjellum, Weiss, Nerison, Jukkala, Wright & Paulson, Jamestown, for plaintiff and appellant; argued by Cecelia Ann Wikenheiser, Jamestown.
Johnson, Johnson, Stokes, Sandberg & Kragness, Wahpeton, for defendants and appellees; argued by A. Warren Stokes, Wahpeton.
GIERKE, Justice.
Nancy Harrington (Nancy) appealed a district court judgment which dismissed her mortgage foreclosure action and ordered her to satisfy two mortgages she holds against a farm owned by her former spouse Gerald R. Harrington (Gerald).[1] We affirm.
Nancy and Gerald were divorced in 1981. As part of the divorce Nancy and Gerald executed a property settlement agreement giving Gerald ownership of the parties' farm. In return for Gerald receiving the farm he was to pay Nancy $150,000 in the form of a $10,000 initial payment and fifteen annual payments. To evidence this debt Gerald signed a promissory note. To secure the note Nancy took two mortgages on the farm. Gerald paid Nancy the initial payment of $10,000 but was able to pay her only $3,000 in subsequent payments.
In 1981 Gerald, undergoing financial difficulties in farming, could not obtain refinancing of previous bank loans because the mortgages Nancy held on the farm encumbered the land. Consequently in late 1981 Gerald requested Nancy to execute satisfactions of the two mortgages to enable him to receive the needed refinancing.
At that time Nancy and Gerald's son Ronn was farming the land with Gerald. Because Gerald had remarried and his wife had become pregnant, Nancy was concerned Ronn would not inherit the farm.
*555 Consequently, she was willing to satisfy the two mortgages if Gerald would execute a will leaving the farm to Ronn.
Gerald's attorney prepared an agreement, which Nancy and Gerald signed on December 30, 1981, which provided that Nancy would execute satisfactions of the two mortgages and release Gerald from liability on his promissory note. In return Gerald promised to name Ronn as sole devisee in his will of all the farm land he owned prior to January 1, 1978. The agreement further allowed Gerald to encumber or convey the farm land under certain circumstances but that Ronn had the first option to purchase the land.
On April 1, 1982, Gerald made a holographic will devising the farm land to Ronn "in accordance with an agreement between Gerald R. Harrington and Nancy I. Harrington." The will additionally provided that it would be "valid only if [Nancy] complies with her portion of the Agreement."
Gerald subsequently obtained refinancing and continued farming the land with Ronn. However, Nancy did not execute satisfactions of the two mortgages. Instead, on October 3, 1983, she instituted a foreclosure action against Gerald on the two mortgages.
The matter was heard by the district court of Griggs County which concluded as a matter of law that by the December 30, 1981, agreement Nancy became contractually obligated to satisfy the two mortgages and release Gerald from liability on the promissory note. The district court dismissed Nancy's complaint and she appealed.
Nancy contends the December 30, 1981, agreement is not enforceable; therefore the district court erred in ordering her to satisfy the mortgages, because it is an illusory contract and thus not supported by consideration.
Consideration is a sine qua non to the existence of a contract. NDCC § 9-01-02(4). Consideration may be defined as any benefit conferred or detriment suffered. Gulden v. Sloan, 311 N.W.2d 568, 572 (N.D.1981); NDCC § 9-05-01. Detriment, as used in a contractual context, means legal detriment as distinguished from detriment in fact. It means giving up something which the promisee was privileged to retain, or doing or refraining from doing something which he was privileged not to do, or not to refrain from doing. Gulden, supra.
If consideration as so defined exists, courts will generally not inquire into the adequacy of the consideration.[2] See generally, 1 Williston, Contracts, § 115 (3d ed. 1957); 1 Corbin, Contracts, § 127 (1963). However, it is important to distinguish the adequacy of consideration from its existence. When no consideration is present a valid contract is not formed and this is a legal issue which may be determined by a court. Gulden, supra at 572.
One instance where the lack of consideration invalidates a contract is when the contract is illusory. An illusory contract may be defined as an expression cloaked in promissory terms, but which, upon closer examination, reveals that the promisor has not committed himself in any manner. In other words, an illusory promise is a promise that is not a promise. The promise is an illusion. See, Corbin, "The Effect of Options on Consideration," 34 Yale L.J. 571 (1925).
Nancy argues that Gerald's promises contained in the December 30, 1981, agreement were illusory. Therefore, she maintains there was no consideration, as distinguished from inadequate consideration, supporting the agreement and, consequently, the agreement is invalid and unenforceable.
The agreement provided Nancy would satisfy the mortgages and release Gerald's liability on the underlying debt and in return Gerald would devise the farm land to Ronn. However, the agreement subjected *556 the devise to Ronn to the following conditions: Ronn would inherit the land subject to all its encumbrances; Ronn would be obligated to make annual payments of twenty-five percent of all the crops raised on the land to Gerald's widow as long as she had any farm-related debt; Gerald is permitted to convey a portion of the land for purposes of continuing the farming operation in the event "future economic exigencies" so require; and finally, Ronn was granted the first option to purchase any of the farm land sold by Gerald.
Nancy argues the foregoing language accords Gerald the unlimited right to encumber or convey the farm land which thereby renders his promises contained in the agreement "worthless" and illusory.
Although the agreement may not be entirely equitable for Nancy, it is not illusory and is supported by considerationin return for Nancy's satisfaction of the mortgages and underlying debt Gerald gave up something which he was privileged to retain: the legal right to devise his farm land to one of his own choosing. Gulden, supra. See also, Kuhn v. Kuhn, 281 N.W.2d 230 (N.D.1979). The fairness of the agreement is irrelevant. Gerald's relinquishment of a legal right constituted consideration for the agreement regardless of the value of that right to Nancy. Gulden, supra.
The possibility that Ronn may inherit only a reduced and unencumbered portion of the farm land does not alter the fact that Gerald relinquished a legal right which constitutes consideration. Merely because future events may affect the nature and extent of Ronn's devise does not invalidate the legal detriment suffered by Gerald.[3]
Nancy further contends the agreement is illusory because the devise to Ronn of the farm land may possibly be reduced or extinguished if Gerald dies and his widow takes an elective share of his estate pursuant to NDCC Ch. 30.1-05. NDCC § 30.1-05-01 allows a surviving spouse the right to elect against taking under a will and instead receive one-third of the decedent's augmented estate.
In this instance, if Gerald were to die, his current spouse could elect to take one-third of his augmented estate, which conceivably could include all or part of the farm land devised to Ronn. Gerald's widow's selection could thus possibly preclude Ronn from inheriting the farm land.[4]
The possibility that Ronn's devise could conceivably be circumvented does not render the agreement illusory. Simply because Gerald's wife may someday be in a position to intrude upon Ronn's devise by taking her elective share does not affect the fact when Gerald devised the land to Ronn he relinquished a privilege he was not otherwise lawfully bound to relinquish. This constituted the legal detriment necessary to establish consideration to support the agreement.[5]
For the foregoing reasons we conclude the December 30, 1981, agreement between Nancy and Gerald is not illusory, but valid and enforceable.
The final issue raised by Nancy asserts the district court erred in ordering her to satisfy the two mortgages. The district court judgment stated Gerald "is entitled to have [Nancy] execute the mortgage satisfaction. In the event that [Nancy] does not execute such satisfaction, [Gerald's] attorney may apply by Court Order for the satisfaction."
*557 Nancy argues the district court judgment in effect granted Gerald the equitable remedy of specific performance in ordering her to satisfy the mortgages and that this action was improper for sundry reasons.
Initially, Nancy claims Gerald should have been barred from seeking specific performance because such a remedy amounted to a compulsory counterclaim and Gerald failed to request such relief in his answer as required by North Dakota Rule of Civil Procedure 13(a).
Gerald's answer to Nancy's complaint did not contain a counterclaim seeking specific performance.[6] Rather, his prayer for relief requested that the court require Nancy to issue a satisfaction of the mortgages. Generally, the failure to plead a compulsory counterclaim will bar litigating that claim in that action. Leo Lumber Company v. Williams, 191 N.W.2d 573 (N.D.1971). However, when an issue not properly raised by the pleadings is tried by the express or implied consent of the parties it may be treated in all respects as if it had been raised in the pleadings. Graven v. Backus, 163 N.W.2d 320, 321 (N.D.1968); NDRCivP 15(b). In this case the issue of Nancy's failure to satisfy the mortgages was raised at trial and ruled upon by the court; consequently, its litigation was not barred by NDRCivP 13(a).
Nancy's next contention is that specific performance is not available to Gerald because he did not demonstrate the inadequacy of his legal remedies. See Wolf v. Anderson, 334 N.W.2d 212 (N.D.1983). Nancy's argument, citing Wolf, supra at 215, that Gerald's pleadings do not clearly demonstrate the inadequacy of his legal remedies, and that specific performance is inappropriate, is unconvincing. The fact Gerald did not explicitly request specific performance is not determinative. The district court had equitable jurisdiction to provide a remedy where none exists at law, even if the parties have not specifically requested an equitable remedy, whenever the pleadings sufficiently give notice of the party's right to relief and demand for judgment pursuant to NDRCivP 8(c). A & A Metal Bldgs. v. I-S, Inc., 274 N.W.2d 183, 188 (N.D.1978). It is difficult to formulate a legal remedy which would provide competent relief to Gerald other than specific performance. Gerald desires Nancy to satisfy the mortgages, thereby lessening the encumbrances on the farm. Monetary damages will not serve this purpose. Gerald's legal remedies are inadequate.
Finally, Nancy asserts Gerald is not entitled to specific performance of the December 30, 1981, agreement because such an outcome "runs afoul of general principles of equity and is unjust."
NDCC § 32-04-13 expressly limits the availability of specific performance and reads:
"Specific performance cannot be enforced against a party to a contract in any of the following cases:
1. If he has not received an adequate consideration for the contract.
2. If it is not as to him just and reasonable.
3. If his assent was obtained by misrepresentation, concealment, circumvention, or unfair practice of any party to whom performance would become due under the contract, or by any promise of such party which has not been substantially fulfilled.
4. If his assent was given under the influence of mistake, misapprehension, or surprise, except that when the contract provides for compensation in case of mistake, a mistake within the scope of such provision may be compensated for and the contract specifically enforced in other respects, if proper to be so enforced."
*558 In support of her claim of inadequate consideration Nancy reiterates her prior argument that Gerald's prerogative under the agreement to convey or encumber the farm land, and his spouse's potential ability to take an elective share of his estate encompassing the farm land, renders the agreement's consideration inadequate under NDCC § 32-04-13(1).
Mere inadequacy of consideration does not justify a denial of specific performance in the absence of unfairness or overreaching. Arhart v. Thompson, 75 N.D. 569, 31 N.W.2d 56, 61 (1948). Generally, specific performance will be denied only when the inadequacy of consideration is such as to demonstrate some gross imposition, undue influence, or shocks the conscience. See generally, Marker v. Van Gerpen, 39 S.D. 648, 166 N.W. 151 (1918); 27 Am.Jur., Equity, §§ 25, 26.
The granting of specific performance rests in the sound discretion of the trial court and we will not interfere with that discretion unless we are shown it was abused. Wolf, supra at 215. Although the agreement here may present less than a paradigm of balanced bargain, we cannot conclude the trial court abused its discretion in ordering Nancy to satisfy the mortgages.
Even assuming, arguendo, the consideration was inadequate, Nancy has not demonstrated the inequity of her position to warrant denying Gerald specific performance. Nancy claims she was pressured into signing the agreement because of Gerald's admonition that unless she satisfied the mortgages he, and consequently Ronn, could possibly be forced to stop farming due to financial constraints. Although Nancy may have felt some compunction to sign the agreement it did not appear to the trial court, or to us, that she was unduly influenced or coerced by Gerald. Courts have neither the authority nor competence to rectify all perceived injustices or right all asserted wrongs. For the foregoing reasons we affirm the judgment of the district court.
ERICKSTAD, C.J., VANDE WALLE, J., LARRY M. HATCH, District Judge, and VERNON R. PEDERSON, Surrogate Judge, concur.
LARRY M. HATCH, District Judge, participated.
Surrogate Judge PEDERSON participated in this case by assignment pursuant to § 27-17-03, NDCC.
NOTES
[1]  The Farmer's Home Administration filed a disclaimer of any interest in the farm land involved in the case and the Security State Bank of Hannaford filed a notice of appearance. The other defendants did not appear.
[2]  When specific performance is requested a court, acting in equity, may inquire into the adequacy of the consideration. NDCC § 32-04-13.
[3]  It is important to note that Gerald is obligated to act in good faith in fulfilling his promises contained in the agreement, NDCC § 1-01-21, and therefore would be unable to convey or encumber the land simply to avoid effectuating his devise to Ronn. See, In re Estate of Chayka, 176 N.W.2d 561 (Wis.1970).
[4]  Gerald's current wife has not waived her right to an elective share. See NDCC § 30.1-05-04.
[5]  Gerald testified he maintained a $500,000 life insurance policy, the proceeds of which would be paid to the bank to satisfy the mortgages against the farm land. Consequently, upon Gerald's death Ronn could conceivably inherit the farm land free and clear of all encumbrances.
[6]  Any claim that is logically related to another claim that is being sued on is properly the basis for a compulsory counterclaim. Leo Lumber Company v. Williams, 191 N.W.2d 573, 576 (N.D.1971). In this case Gerald's seeking of specific performance arose out of the transaction or occurrence which was the subject of Nancy's claim and therefore is properly a compulsory counterclaim. NDRCivP 13(a).
