
402 N.W.2d 815 (1987)
William O. COOLEY, Appellant,
v.
MAJOR MEDIA MANAGEMENT CORPORATION, a Minnesota Corporation, et al., Respondents.
No. C0-86-1307.
Court of Appeals of Minnesota.
March 24, 1987.
Review Denied May 20, 1987.
Mark J. Kiperstin, William S. Rosen, St. Paul, for appellant.
Richard T. Ince, Ince & Liszt, P.A., Minneapolis, for respondents.
*816 Heard, considered and decided by POPOVICH, C.J., and NIERENGARTEN and RANDALL, JJ.

OPINION
NIERENGARTEN, Judge.
In November 1985 appellant William O. Cooley sued to recover compensation for services he performed in removing building restrictions from real estate owned by Naegele, Inc.[1] The trial court denied recovery and granted respondent specific performance of an alleged purchase agreement with Cooley. We affirm in part and reverse in part.

FACTS
Naegele, Inc. (Naegele) owned some undeveloped wetlands in Minnetonka on which a large Naegele advertising structure was erected. The realtor, Neal A. Perlich testified that, although the listing price was $65,000, the property value was zero due to the wetlands designation and a persistent rumor that the property would be condemned by the highway department for an interchange.
While viewing the property, Perlich explained to Robert O. Naegele, Sr. (R.O. Naegele) president of Naegele, Naegele's assistant Richard Condon, and Cooley, the difficulties involved in selling the land. Cooley felt that a site plan seeking removal from the flood plain district could be developed and submitted to Minnetonka. R.O. Naegele allegedly suggested that Cooley make the application on Naegele's behalf, and undertake whatever was necessary to remove all restrictions and allow development of the land. This included hiring architects and engineers to draw up plans and attending all necessary meetings. Naegele was to underwrite all the costs and expenses incurred during this process. Cooley claims that R.O. Naegele agreed to pay him a fee of one-half the increased value of the land if the restrictions were removed.
Cooley had to establish a sufficient interest in the land to give him a standing to appear before the city council. He therefore entered into an agreement with Naegele March 15, 1984, to purchase the land for $249,000 with a closing date of September 1, 1984. Cooley proceeded with the site application and was reimbursed for expenses incurred, the last payment received after R.O. Naegele's death.
On January 21, 1985, Cooley's site plan was approved. In a letter dated March 5, 1985, Naegele, Inc. revoked the offer to sell Cooley the property. No mention was made of any payment to or by Cooley. Apparently the property was to be taken by the Highway Department. Cooley wrote to Mr. Condon, now President of Metro Media, (Naegele's successor in interest) and set forth the agreement he believed he had with R.O. Naegele and claimed half the condemnation price over the $65,000 listing price as payment for his services.
Mr. Condon indicated that Cooley's efforts did nothing to increase the land's value and therefore Cooley was entitled to half of nothing. Cooley sued for compensation for his services and in order to preserve his right to a fee, filed a notice of the purchase agreement and a mechanic's lien against the property to forestall its sale. Respondent counter-claimed for specific performance of the purchase agreement.
The trial court found that the purchase agreement entered into by William Cooley and Naegele was a valid contract and that Naegele, Inc. and its successors were entitled to specific performance. The court found any labor performed by Cooley was done in furtherance of the purchase agreement. Specific performance was ordered and the mechanic's lien declared null and void. Cooley's motion for amended findings or a new trial was denied and this appeal followed.

ISSUES
1. Did the trial court err in granting specific performance to respondent?
*817 2. Was respondent unjustly enriched because appellant was not compensated for his efforts to increase the value of the property?

ANALYSIS
Findings of the trial court will not be set aside unless they are contrary to the evidence or clearly erroneous. Nave v. Dovolos, 395 N.W.2d 393, 396-97 (Minn.Ct.App. 1986). Evidence on appeal is viewed in the light most favorable to the prevailing party. Theisen's, Inc. v. Red Owl Stores, Inc., 309 Minn. 60, 66, 243 N.W.2d 145, 149 (1976). However, the reviewing court may "review any other matter as the interest of justice may require." Minn.R.Civ.App.P. 103.04.

I
Cooley asserts that his purchase agreement for the Naegele property was merely a "tool" to allow him to get building restrictions removed from the property, which he accomplished. Richard Condon did not feel Cooley's actions contributed to the increase in the property value. According to Condon, the only agreement he was aware of was the purchase agreement for $249,000 and an unwritten agreement to provide some expense money for the removal of the land use restrictions. That version is suspect when one considers that Cooley, for many years, could have purchased the land for $65,000.
Respondent objected to Cooley's version of the agreement as a violation of the parol evidence rule because the only written evidence is the signed purchase agreement. Generally, the terms of a written contract cannot be contradicted or waived by evidence of a prior or contemporaneous oral agreement. See Anchor Casualty Co. v. Bird Island Produce, Inc., 249 Minn. 137, 145, 82 N.W.2d 48, 54 (1957). However, "[e]vidence is admissible to show that the parties, in effect, never entered into a binding agreement because the written agreement was intended as a sham." Hruska v. Chandler Associates, Inc., 372 N.W.2d 709, 714 (Minn.1985). The evidence in this case establishes that the parties never intended to enter into a binding agreement to sell the land for $249,000. "No contract is formed by the signing of an instrument when the offeree is aware that the offeror does not intend to be bound by the wording in the instrument." Hamilton v. Boyce, 234 Minn. 290, 292, 48 N.W.2d 172, 174 (1951).
In addition, specific performance is an equitable doctrine and is given at the discretion of the court. Fred O. Watson Co. v. United States Life Insurance Co., 258 N.W.2d 776, 778 (Minn.1977). Appellant raises the equitable defense of "unclean hands." This defense, "encapsuled in the maxim `one who comes into equity must come with clean hands,' is premised on withholding judicial assistance from a party guilty of unconscionable conduct." Id. Naegele made no effort to exercise the purchase agreement until Cooley instituted his lawsuit. In fact, in a letter to Cooley dated March 5, 1985, Mr. Condon stated "Naegele, Inc. herewith revokes the offer to sell the above property." This revocation attempt coupled with Naegele's tardy demand for specific performance is such evidence of bad faith as to preclude the granting of equitable relief. The trial court erred in requiring specific performance.

II
Cooley claims that Naegele has been unjustly enriched by his efforts to remove the land restrictions. The recovery for unjust enrichment can be measured in two ways. The first is that of "net enrichment," i.e., what did the other party gain. The second is the "cost avoided." See E. Farnsworth, Contracts 103 (1982). Under either of these theories, Cooley could not recover half of the increase in the value of the land. The benefit conferred was the use of Cooley's contacts, expertise, and time, not the increased value of the land. The only easily measurable item Cooley might be entitled to would be a sum for the actual time he spent in developing and presenting the site plan, but he did not *818 request such relief. All the other expenses involved were paid for by Naegele.

DECISION
We affirm the trial court's denial of compensation to Cooley and reverse the trial court's award of specific performance to respondents. We leave the parties in the position they were in prior to entering the March 15, 1984, agreement.
We affirm in part and reverse in part.
NOTES
[1]  Respondents Major Media Management Corporation and Naegele Outdoor Advertising, Inc. are Naegele's successors in interest to the real property.
