
736 N.E.2d 776 (2000)
Thomas A. RUDER, Appellant-Plaintiff,
v.
OHIO VALLEY WHOLESALE, INC., Appellee-Defendant.
No. 82A05-9909-CV-402.
Court of Appeals of Indiana.
October 17, 2000.
*778 Catherine A. Nestrick, Bamberger, Foreman, Oswald and Hahn, LLP, Evansville, Indiana, Attorney for Appellant.
R. Steven Krohn, Krohn and D'Amour, Jerry Atkinson, Evansville, Indiana, Attorneys for Appellee.


*777 OPINION
VAIDIK, Judge

Case Summary
Appellant, Thomas A. Ruder, appeals the trial court's denial of his request for specific performance to purchase a particular lot of the Pine Lake Estates Subdivision (Lot 20) and its grant of declaratory judgment to Ohio Valley Wholesale, Inc. (Ohio Valley) with respect to Lot 20 and another plat Lot 19. We find that Ruder fulfilled the conditions precedent to the contract, did not have unclean hands and that the purchase agreements were executed before any covenants or restrictions were recorded. Therefore, we reverse.[1]

Facts and Procedural History
The facts reveal that Ohio Valley is the owner and developer of Pine Lake Estates Subdivision, Section B. Ruder owns land west of Lots 19 and 20 of the subdivision. Ruder initially led an attempt to prevent the development of the adjacent land. However, after discovering that the sewer system of the subdivision would allow him to develop his land, he decided that he wanted to purchase Lots 19 and 20. Ohio Valley refused to sell to him because he wanted the lots to further develop his land.
Ruder then contracted with Lori Eaton, a real estate agent, to make an offer on Lot 20 for him. She signed the purchase agreement as Lori Eaton for undisclosed buyer. Record at 529. Eaton made the offer on January 21, 1997, and Raymond Michael Elliott, part owner and secretary treasurer of Ohio Valley, accepted the same day. The purchase was contingent on Ruder receiving and reviewing the restrictions and covenants for the lot within twenty-four hours of the acceptance. Ohio Valley sent the restrictions and Ruder accepted them. At the time of the purchase agreement, the restrictions had not yet been recorded by Ohio Valley. According to the language in the purchase agreement, the closing was to occur either within seven days after delivery of merchantable title or on February 14, 1997. The merchantable title was delivered on February 24, 1997, and therefore, the closing was to take place on or before March 3, 1997. Also on February 24, Ohio Valley recorded an amended list of restrictions and covenants which differed from the ones that it originally provided to Ruder. Ohio Valley then refused to close with Ruder because he requested that the original restrictions apply to Lot 20 and not the amended, recorded list of restrictions. Eventually, Ruder also wished to revoke the contract because of the amended restrictions.
*779 David Mounts, who had worked with Ruder's wife, offered to purchase two different lots from Ohio Valley after Ruder informed him that there were lots in a new subdivision in Pine Lake Estates. Mounts made the offers on January 22, 1997, and the offer for Lot 19 was accepted by Ohio Valley the next day. Eventually, Mounts decided he did not want the property because Ohio Valley would not close and he decided he paid too much for the lot. Record at 821-22. On February 6, 1997, Mounts assigned to Ruder all of his rights with respect to Lot 19.
Ruder filed suit for specific performance to complete the purchase of Lot 20 with the original list of restrictions that Ohio Valley gave him. Ohio Valley counterclaimed, claiming that the recorded list of amended restrictions should be applied to both Lots 19 and 20, which were the only lots in the subdivision sold before the restrictions were recorded. After filing the suit, Ruder put up a fence, which Elliott described as an eyesore, he put a satellite dish and tool shed on his property, he complained to the Soil and Water Conservation District, and he allegedly committed acts of vandalism. Record at 746-52.
After a bench trial, the judge denied Ruder's claim for specific performance and granted declaratory judgment to Ohio Valley listing specific restrictions from the amended restrictions list that were to be applied to the two lots.

Discussion and Decision
Thomas Ruder raises two arguments on appeal. First, he claims that the trial court erred in denying specific performance on the contract for Lot 20 because he fulfilled all the conditions precedent contained in the purchase agreement and his behavior did not rise to the level of unclean hands. Second, Ruder argues that the trial court erred in granting Ohio Valley declaratory judgment with respect to Lots 19 and 20 because the purchase agreements for both lots were completed before Ohio Valley recorded any restrictions. We address each argument in turn.

I. Specific Performance
Ruder appeals the trial court's denial of specific performance in relation to completing the purchase agreement for Lot 20. The decision whether to grant specific performance is a matter within the trial court's sound discretion. Kaghann's Korner, Inc. v. Brown & Sons Fuel Co., 706 N.E.2d 556, 563 (Ind.Ct.App.1999). Because an action to compel specific performance sounds in equity, particular deference must be given to the judgment of the trial court. Wagner v. Estate of Fox, 717 N.E.2d 195, 200 (Ind.Ct.App.1999). Specific performance is a matter of course when it involves contracts to purchase real estate. Id. It is an equitable remedy, and thus, the power to compel specific performance is an extraordinary power. Id. at 201. A party seeking specific performance of a real estate contract must prove that he has substantially performed his contract obligations or offered to do so. Claise v. Bernardi, 413 N.E.2d 609, 612 (Ind.Ct.App.1980).
Here, the purchase agreement was conditioned on a clause which stated: offer contingent upon purchaser's review of complete covenants and restrictions within 24 hours of acceptance of offer. If no written objections are presented by buyer's agent to selling agent within 24 hours of acceptance then these restrictions and covenants are deemed acceptable. Record at 528, Plaintiff's Exhibit 2. Ohio Valley provided a list of the restrictions to its agent who in turn gave it to Eaton. Ruder then examined the list and did not offer any written objection to them.

A. Conditions Precedent
Ruder argues that he fulfilled the conditions precedent to the purchase agreement. However, Ohio Valley alleges that the conditions precedent were not met because the purchase agreement was contingent on it providing a copy of the complete restrictions and covenants, and the restrictions it provided Ruder were only proposed restrictions since they had not *780 been recorded yet. This argument is not persuasive. Elliott testified that he knew of the language in the purchase agreement, and he then accepted the offer and sent a list of restrictions to Ruder through his agent. Record at 641-42. Further, neither the purchase agreement nor the list given to Ruder distinguishes between a proposed list of restrictions and a complete list of restrictions.
Ohio Valley also argues that Ruder failed to demand to close. As a general rule, a party cannot enforce the specific performance of a contract for the conveyance of real estate until he has made a demand to close. Timmonds v. Taylor, 48 Ind.App. 531, 96 N.E. 331, 333 (Ind.1911). Here, the purchase agreement contained a clause stating that the closing date was either February 14, 1997, or seven days after receiving the merchantable title which was February 24, 1997 (thus requiring the closing by March 3, 1997). Clearly, no closing occurred on or before March 3, 1997.
However, the demand to close is not necessary where a demand would be unavailing. Id. In the instant case, Elliott testified that Ohio Valley was ready to convey the real estate to Ruder, but that it did not because Ruder wanted the original covenants and restrictions. Record at 637-38. Based on this evidence, Ohio Valley would not have closed at any time even if Ruder had made a demand. Therefore, any demand by Ruder would have been unavailing, and thus, it was not necessary for him to demand to close after March 3, 1997. Therefore, we hold that Ruder fulfilled the conditions precedent to the contract.

B. Unclean Hands
Second, Ruder argues that specific performance is proper because he did not have unclean hands. The unclean hands doctrine is an equitable tenet which demands one who seeks equitable relief to be free of wrongdoing in the matter before the court. Stewart v. Jackson, 635 N.E.2d 186, 189 (Ind.Ct.App.1994), trans. denied. The alleged wrongdoing must have an immediate and necessary relation to the matter being litigated. Keystone Driller Co. v. General Excavator Co., 290 U.S. 240, 245, 54 S.Ct. 146, 78 L.Ed. 293 (1933). Ohio Valley argues that Ruder had unclean hands because he initially opposed the development of the subdivision, and after he filed this lawsuit he put up an eyesore fence, left a satellite dish lying in his yard, put up a tool shed, committed vandalism, and complained to the Soil and Water Conservation Department about the subdivision. He also kept his identity hidden when he attempted to purchase Lot 20. Ohio Valley asserts that if it would have known the buyer was Ruder, it would not have sold him the lot. Again, we are not persuaded.
Ruder's opposition to the approval of the subdivision and his behavior after he filed the lawsuit do not equate to unclean hands. Ruder's behavior is not related to the cause of this litigation which is the contract for Lot 20. The only link that Ruder's behavior has to the current litigation is that Ohio Valley initially refused to sell to him. Although he originally attempted to keep Ohio Valley from developing the subdivision, Ohio Valley nevertheless received the necessary approval to develop the subdivision. Therefore, any previous attempts by Ruder to stop development are irrelevant to this matter.
Ruder also showed questionable behavior after he filed this lawsuit when he put up a fence on his property which was described by Elliott as an eyesore, left a satellite dish and what looked like a broken down chicken coop in his yard, allegedly filed a complaint with the Soil and Water Conservation District concerning silt fences and sandbags, and allegedly committed acts of vandalism. Record at 746, 749, 750-52. However, courts of equity are not primarily engaged in the moral reformation of the individual citizen. Keller v. Indiana Dep't of State Revenue, 530 *781 N.E.2d 787 (Ind. Tax Ct.1988) (quoting 27 AM. JUR.2d Equity § 138 (1974)). The purpose of the unclean hands doctrine is so that a party does not reap the benefit from his misconduct. HENRY MCCLINTOCK, HANDBOOK OF EQUITY 35 (1936). Here, Ruder did not benefit from his alleged misconduct. Elliott testified that Ohio Valley's failure to close had nothing to do with Ruder's actions. While Ruder's acts, if true, may be repugnant, they do not relate to this action and therefore, cannot be used to deny specific performance.
We also find that Ruder's purchase of Lot 20 through an agent as an undisclosed principal did not rise to the level of unclean hands. It is very familiar learning that the agent may enter into a contract for the purchase of land for an undisclosed principal.... Lenman v. Jones, 33 App. D.C. 7, (1909) (quoting Kelly v. Thuey, 143 Mo. 422, 45 S.W. 300, 304 (1898)), aff'd, 222 U.S. 51, 32 S.Ct. 18, 56 L.Ed. 89 (1911). Ruder never misrepresented the fact that there was an agency relationship between him and Lori Eaton, or that he was the undisclosed buyer. This is evidenced by the fact that Eaton signed the purchase agreement Lori Eaton as agent for undisclosed buyer. Record at 529, and Plaintiff's Exhibit 2. Ohio Valley never inquired about the identity of the undisclosed buyer. In fact, Elliott testified that he is not concerned with who the purchaser is on a purchase agreement when he signs it. Record at 716.
Ohio Valley relies on Favata v. Mercer, 409 Ill. 271, 99 N.E.2d 116 (1951), to assert that Ruder's failure to reveal his identity was unfair practice, and thus, specific performance should not be allowed. However, Favata is distinguishable from the case at hand. In Favata, the court denied specific performance to a purchaser who disguised his identity by using a false name in order to procure a purchase contract. Id. at 18, 99 N.E.2d 116. Here, Ruder did not use a false name, rather he was listed on the purchase agreement as an undisclosed buyer and any investigation would have revealed his identity. Ohio Valley could have decided not to sell to an undisclosed buyer, but chose to do so. They may not complain now. For the above reasons, we conclude that Ruder met all the conditions precedent and did not have unclean hands. Accordingly, specific performance should have been granted.

II. Declaratory Judgment
Finally, Ruder argues that the trial court should not have granted declaratory judgment to Ohio Valley. The trial court, in granting declaratory judgment, entered the following restrictions for both Lot 19 and Lot 20:
a. Except for platted streets and roadways, no street or roadway may be constructed over any lot within the subdivision known as Pine Lake Estates, Section B in Vanderburgh County, State of Indiana (the subdivision);
b. Use of the lots within the subdivision is restricted to single family dwellings and related uses: and
c. Any construction on a lot within the subdivision must be approved by the Review Committee before any construction may begin.
Record at 428, 432.
The trial court decided that the amended set of restrictions applied to the contracts for the sale of Lots 19 and 20. We disagree. In order for restrictions to be applicable to all lot owners, they must be recorded before the sale of the lots. Rogers v. City of Evansville, 437 N.E.2d 1019, 1028 (Ind.Ct.App.1982) (holding that where a sewer agreement was entered into and recorded after the sale of lots, the developer may not bind subsequent owners after he has divested himself of title). At the time of contract formation for both Lots 19 and 20, neither the restrictions given to Ruder or Ohio Valley's amended restrictions were recorded. Further, Ohio Valley accepted the offers to sell both lots well before it finally recorded the amended restrictions. Ohio Valley could have waited to sign any purchase *782 agreements or accept any money until the amended restrictions had been recorded. However, it did not do so. Instead, Ohio Valley sent Ruder a list of restrictions, which Ruder relied upon, and then subsequently recorded another set of restrictions. Therefore, the trial court's entry of declaratory judgment for Ohio Valley was erroneous.
We conclude that specific performance should be granted to Ruder with respect to the sale of Lot 20 and that the trial court erred in granting Ohio Valley declaratory judgment with respect to the applicable restrictions for Lots 19 and 20.
Therefore, we reverse and remand to the trial court to grant specific performance.
SULLIVAN, J., and BAILEY, J., concur.
NOTES
[1]  Ohio Valley filed a Motion to Strike Portions of Reply Brief of Appellant on May 9, 2000. We grant the appellee's motion. The portions of the reply brief that are consequently struck have not been considered in issuing this opinion.
