#### Martin J. Hedrich, Jr., et al., Plaintiffs-Appellants, v. Village of Niles, a Municipal Corporation, Nicholas B. Blase, Edward Berkowsky, Santo S. Bruno, Angelo Marcheschi, Keith W. Peck, Kenneth Schell, and Robert H. Wente, as Members of the Village Board of the Village of Niles, Illinois, the Evanston Trust and Savings Bank, a Corporation, as Trustee Under Trust No. 632, and J. Emil Anderson & Son, Inc., a Corporation, Defendants-Appellees.

Gen. No. 52,783.

First District, Third Division.

May 15, 1969.

Rehearing denied August 11, 1969.

*70Plack & Wrobel and John P. Murray, of Chicago (John P. Murray, of counsel), for appellants.

Ancel, Stonesifer & Glink, and James G. Sneider, of Chicago (Louis Ancel, Marvin J. Glink, and James G. Sneider, of counsel), for appellees.

MR. JUSTICE DEMPSEY

delivered the opinion of the court.

This is a zoning case. The property in dispute was formerly known as the Tam O’Shanter Country Club and consists of approximately 123 acres of land situated in the Village of Niles. The property, which was zoned for single-family residences, was purchased for about $3,250,000 in July 1965 by one of the defendants, J. Emil Anderson & Son, Inc., a firm specializing in industrial land development. Anderson immediately petitioned the Village to rezone the property from residential to limited manufacturing use.

The petition was referred to the Plan Commission of the Village of Niles. The commission held seven public hearings on the request, the first of which was in September 1965. In the Spring of 1966 Anderson amended the petition to exclude 371⁄2 acres of the property from the requested reclassification. At the last hearing, near the end of May 1966, the commission decided to recommend the rezoning. The board of trustees of the Village adopted the recommendation in late August 1966 and amended the Village’s 1961 zoning ordinance accordingly.

*71The plaintiffs, homeowners in the Village, filed their complaint in this action the middle of the following September. The Village and Anderson answered. The pleadings were typical of zoning cases. The plaintiffs attacked the amendment on the grounds that it was arbitrary and capricious and bore no reasonable relation to the public health, safety and welfare. They prayed for a judgment declaring the amendment invalid and for temporary and permanent injunctions restraining the Village and the Anderson Company from developing the property for industrial purposes. The defendants denied that the amendment did not bear a reasonable relationship to the general welfare. They asserted that the rezoning was compatible to the established uses in the immediate vicinity, and that the development proposed for the property would bring increased employment to the citizens of the community and tax benefits to the Village without the corresponding increase in municipal burdens which would be incidental to a residential classification.

The property is rectangular in shape, extending lengthwise from north to south and is bisected by Howard Street, an east-west thoroughfare. Thirty-seven and one-half acres lie north of Howard Street and eighty-five acres south of it. It is bordered by a forest preserve on the west, a portion of the forest preserve and an area zoned for retail business on the north, Caldwell Avenue on the east and by a four or five-acre manufacturing district and Touhy Avenue on the south. The greater portion of the east side of Caldwell, opposite the property, is zoned and used for industrial purposes; the lesser portion, consisting of eleven residential lots, is zoned and used for single-family homes. One of these homes is occupied by plaintiff — the only plaintiff who owns a home adjacent to the subject property. The southernmost industry on the east side of Caldwell abuts the north side of this home.

*72After a trial which included the testimony of both lay and expert witnesses, the court found that the plaintiffs had failed to establish that the amended ordinance was invalid in any respect. The court declared that the highest and best use of the property was for limited manufacturing and that the ordinance was a proper and valid legislative enactment.

The issue on appeal is not typical of zoning cases. The plaintiffs do not challenge the decree on the ground that it is contrary to the evidence or not in conformity with established principles of zoning law. They challenge it on the ground that the court erred in refusing to consider another issue which entered the case and in rejecting evidence in support of this issue: that the Village Plan Commission recommended, and the Village trustees adopted the zoning amendment in exchange for promises, concessions and contributions from the Anderson Company.

The plaintiffs did not raise this issue in their complaint. It came into the case, surprisingly enough, through Anderson’s answer. Anderson denied that the entire property was to be developed for industrial purposes; it affirmatively alleged that the 371⁄2 acres north of Howard Street were to be developed as a public golf course. Also, as an affirmative defense, it stated that in between the plan commission’s first and last public hearing Anderson conducted negotiations with the Niles Park District which resulted in an understanding that the park district could purchase the 371⁄2 acres for construction of a nine-hole golf course; that after this agreement was reached, park district officials appeared before the plan commission and recommended that Anderson’s application to reclassify the property south of Howard Street be approved.

In his opening statement, the defendants’ attorney elaborated on the agreement with the park district. He said that after it was made, the plan commission approved *73the proposed rezoning and recommended it to the board of trustees of the Village. The first witness for the defendants, the president of the Anderson Company, supplied the details of the agreement. He testified that the park district and the Village of Niles were given a seven-year option to buy the 371⁄2 acres; that if the district did not exercise the option within six and one-half years the Village had the right to do so within six months after the district’s option expired. He said that the purchase price was $1,300,000, fifty percent of which was to be financed by the sale of revenue bonds; that Anderson had agreed to find a purchaser for the bonds and, after the expiration of ten years, to donate $550,000 of the purchase price back to the district. He further said that if the district did not exercise its option at once the agreement provided for Anderson to develop the 371⁄2 acres as a public golf course — the cost of which was estimated at $175,000 — without impairment of the right of the district or Village to exercise the option within the seven-year period at the original purchase price.

In addition to this arrangement, the witness testified that his company donated an acre of land to the Village for a fire station, gave the Village $75,000 for street improvements, agreed to pay for a traffic engineering survey and, at the cost of nearly $10,000, provided a water main which would increase the water pressure of the homes on the east side of Caldwell.

On cross-examination, counsel for the plaintiffs asked whether the agreement in reference to the 371⁄2 acres would have been entered into if the zoning had not been changed from residential to manufacturing. The defendants’ counsel then stated that he would stipulate that the agreement was conditioned upon the zoning change.

Thereafter, the position of the parties changed abruptly. The plaintiffs, who had not raised the point in their complaint, seized upon the gifts to the Village as an *74additional reason for challenging the rezoning; and the defendants, who had been making capital of their generosity, quickly backed away from the issue and objected when the plaintiff attempted to expand it.

The plaintiffs offered in evidence the minutes of the meeting of the Village trustees at which the zoning amendment was adopted. The minutes indicated that the agreements pertaining to the golf course and the land for a fire station were discussed by the trustees before they voted on the amendment. One of the trustees said they “were probably getting the best deal they could.” The minutes were not received in evidence. The plaintiffs offered to prove, through the testimony of the Village’s corporation counsel, that the minutes would reveal that Anderson’s promises were conditioned upon the zoning change and that Anderson had demanded that the change be made within forty days of its oral agreement with the park district. The court noted that the issue had not been raised in the plaintiffs’ complaint and sustained the defendants’ objection.

As the trial came to an end the plaintiffs again pressed the issue but the defendants objected that it had not been raised in the pleadings. The plaintiffs’ attorney pointed out it had been raised at the trial and that the complaint could be amended. The trial concluded with an offer of proof by the plaintiffs. Offered into evidence were the minutes of the last meeting of the plan commission at which the agreement was reported by one of the defendants’ attorneys who told the commission: “The entire contract and transaction with the Park District is conditioned upon the remaining 85 acres being rezoned for M-Limited Manufacturing within 40 days from yesterday.” The minutes contained statements by the chairman of the commission that Anderson had agreed to make a cash contribution of $550,000. The minutes also showed that the commissioners understood that if the park district did not exercise the option to purchase, the *75same option and terms would be available to the Village itself. Objections to the offer of proof by the defendants were sustained. Once again the court stated that the issue of an improper exchange was not before it, that the only issue under consideration was the constitutionality and reasonableness of the amended ordinance and that this was the only issue it was going to pass on.

 Despite the plaintiffs’ failure to allege, or to amend their complaint to allege, the agreement between Anderson and the park district and the benefit to the Village from this and the other concessions and gifts, the issue was joined at the trial. Normally, the plaintiffs would be in no position to question the effect of the contingent agreement on the validity of the amended ordinance for a party cannot have relief under proof without appropriate allegations. Burke v. Burke, 12 Ill 2d 483, 147 NE2d 373 (1958) ; Consoer, Townsend & Associates v. Addis, 37 Ill App2d 105, 185 NE2d 97 (1962). However, parties may form their own issues during a trial, and an objection that an issue has not been raised in the pleadings may be deemed waived if the party objecting has himself introduced evidence on the subject. Head v. Wood, 20 Ill App2d 97, 155 NE2d 348 (1959); McKinney v. Nathan, 1 Ill App2d 536, 117 NE 2d 886 (1954). In McKinney the court said:

> “The parties may, by the introduction of evidence or their conduct in the trial, waive formal pleadings or form their own issues on the evidence introduced, and they may voluntarily present under the evidence issues not presented by the pleadings. An objection that a certain matter is not an issue under the pleadings or that it is not denied or properly denied may be waived by a party where he introduces or brings out evidence bearing on the subject, or tries the case as if the matter were not in issue.”

*76By introducing the subject in their answer and by developing it during the direct examination of their first witness, the defendants waived the deficiency in the plaintiffs’ complaint.

The defendants accuse the plaintiffs of attempting to inject into the case an issue that arose only tangently in the trial court and argue (1) that the theory upon which a case is tried cannot be changed on appeal and (2) that an issue not considered by the trial court cannot be raised for the first time on appeal. These arguments have no merit in view of the development and joinder of the issue in the manner we have described. While it is true that an issue not considered by a trial court cannot be raised on appeal, the very thrust of this appeal is the refusal of the trial court to consider the issue.

Equally unimpressive is Anderson’s argument that it has acquired a vested right in the amended zoning ordinance because of expenditures made in reliance on the amendment. It includes among these expenditures the interest on the money it spent to buy the property and the taxes it paid prior to the adoption of the amendment. Such payments may have been in anticipation of the amendment — they obviously were not in reliance upon it. However, the bulk of the expenditures were made in improving the property and in developing it for industrial purposes after the amendment was adopted and at the time of the trial these expenditures amounted to several hundred thousand dollars. There also was testimony that various-sized parcels of land had been sold to industrial concerns, which in some instances had begun or had completed the construction of buildings. These expenditures and sales undoubtedly complicate the present situation but they were made in the face of the plaintiffs’ expeditious action for injunctive relief which was filed just twenty-four days after the amended ordinance was passed. The expenditures and sales were not brought about by the plaintiffs — indeed, they tried to stop them. *77The plaintiffs did not mislead Anderson, cause it to change its position or spend its money. What has developed is Anderson’s own responsibility and the blame cannot be laid at the plaintiffs’ doorstep, as the defendants try to do in their brief, because the plaintiffs’ prayer for a prohibitory injunction was not acted upon immediately.

 More impressive, however, is the defendants’ argument that courts have no right to inquire into the motives of the Village trustees in passing the ordinance. Ordinarily, courts cannot inquire into the reasons motivating a legislative body in enacting zoning regulations and may determine only if the legislative body had the authority to pass the ordinance and, if so, whether it is arbitrary and unreasonable or bears a reasonable relation to the public health, safety and welfare. 2700 Irving Park Bldg. Corp. v. City of Chicago, 395 Ill 138, 69 NE 2d 827 (1946). This long-established rule must, however, be balanced against a more recent one: that zoning ordinances should not be subject to bargaining or contract. In Treadway v. City of Rockford, 24 Ill2d 488, 182 NE2d 219 (1962), in remanding a zoning case for a new trial, the reviewing court went out of its way to comment on an issue that had not been raised either in the trial court or on appeal. The court stated:

> “All the parties have argued as if this were an ordinary amendment rezoning property from one classification to another within the framework of the general zoning scheme set forth in the original ordinance. The ordinance in question is not, however, an unconditional amendment rezoning the property from a residential to a local business classification. It is conditional upon the owner’s entering into a covenant setting forth in some detail the nature of the improvements to be erected on the property. Such conditional amendments have not fared well in *78the courts of other jurisdictions, and have frequently been invalidated either because they introduce an element of contract which has no place in the legislative process or because they constitute an abrupt departure from the comprehensive plan contemplated in zoning.”

Although the amendment in the present case was not contract zoning in the sense that it was conditioned upon an agreement as to the future use of the rezoned property, it was conditioned upon an agreement for the future use of another parcel of land owned by the same applicant and upon other agreements and donations which inured to the benefit of the Village. In accepting these donations and entering into or approving these agreements the trustees of the Village undoubtedly did what they believed was best for the whole community, but it places them in the questionable position of bartering their legislative discretion for emoluments that had no bearing on the merits of the requested amendment.

Based on the limited evidence heard by the trial court, we find no error in its decision that the amended ordinance was valid. There is a presumption of validity in favor of a zoning ordinance and the party attacking it must overcome the presumption by clear and convincing evidence. This the plaintiff did not do. While the location and size of the property, the neighborhood surrounding it, and the streets separating it from dissimilar uses would have justified the residential classification if the Village had adhered to it, there was equal justification for the limited manufacturing classification. The property is bordered on one side and part of another by a forest preserve which serves as a protective zone between it and the homes to the west and north; on the other sides the predominate use is industrial and business. The residences facing the property on Caldwell *79Avenue appear to be of fine quality but they comprise only a small percentage of its total frontage.

We do find error, however, in the court’s refusal to consider the issue which surfaced during the trial. This issue must be determined by the trial court before we can consider it. The cause will be remanded so that this can be done — with directions to permit the plaintiffs to present appropriate evidence on this issue, to consider the defendants’ stipulation that the rezoning was conditioned upon the agreement with the park district and to determine what relationship, if any, the evidence and the stipulation bear to the ordinance’s validity.

Reversed and remanded with directions.

SULLIVAN, P. J. and SCHWARTZ, J., concur.