
475 N.W.2d 680 (1991)
Nancy WELLS and Lyle Nevins, Appellees,
v.
DALLAS COUNTY BOARD OF ADJUSTMENT, Appellant.
No. 90-723.
Court of Appeals of Iowa.
August 27, 1991.
*681 David J. Welu, County Atty. and Jeannine R. Suckow, Asst. County Atty., for appellant.
Todd A. Elverson of Eichhorn, Elverson & Vasey, Des Moines, for appellees.
Considered by HAYDEN, P.J., and SACKETT and HABHAB, JJ.
HABHAB, Judge.
Robert and Mary Heddinger owned real estate in Dallas County. They petitioned the Dallas County Board of Adjustment for a special use permit allowing them to establish a dog kennel on their property. Nancy Wells and Lyle Nevins, owners of adjacent real estate, objected to the Heddingers' request.
The Heddingers' request was considered at a public meeting of the Board of Adjustment. Nancy Wells was present at this meeting and voiced her objections to the proposed kennel. At some point during this meeting, the county zoning administrator (not a member of the Board) asked Nancy Wells to leave the room. Subsequently the Board announced that it would assemble at the Heddinger property on a future date to view the proposed kennel site.
A majority of the Board did in fact assemble at the Heddinger property on the specified date. Wells and Nevins were not present because they were unwelcome on the Heddinger property. According to some of the persons present, the Board members did not discuss the kennel proposal while on the Heddinger property. However, there were allegations the Board went into a garage on the Heddinger property and closed the door. Later the same day the Board conducted a regularly-scheduled public meeting and approved the Heddingers' request for permission to operate a kennel.
Wells and Nevins challenged the Board's action by filing a petition for writ of certiorari in district court. After a hearing, the district court granted certiorari relief to Wells and Nevins. The court overturned the Board's action granting the Heddingers a variance to permit a dog kennel. The court concluded the Board had violated Iowa's open meetings law, Iowa Code Chapter 21, by the meeting procedures noted above. The court found there was insufficient evidence supporting the grant of a variance. The court ordered costs be taxed to the Board because the Board had acted with "gross negligence, bad faith and malice".
The Board has appealed the district court's ruling. It contends the district court erred by improperly substituting its judgment for that of the Board and overturning the Board's decision to grant a *682 zoning variance to the Heddingers. The Board also contends the district court erred by holding it had violated the open meetings law. Finally, the Board contends the district court erred by taxing costs to it. The Board challenges the conclusion it acted with "gross negligence, bad faith and malice".
As it relates to the open meetings law, the Board contends there was no violation for two reasons: (1) At the initial public meeting when the Heddinger request was first discussed, the person who asked Nancy Wells to leave was not a member of the Board; (2) When the Board later assembled at the Heddinger property to view the proposed kennel site, there was allegedly no discussion of the Heddinger request or any other business.

I.
The principles of judicial review in a zoning case were set forth in Weldon v. Zoning Bd. of Des Moines, 250 N.W.2d 396, 401 (Iowa 1977):
[I]n a certiorari proceeding in a zoning case the district court finds the facts anew on the record made in the certiorari proceeding. That record will include the return to the writ and any additional evidence which may have been offered by the parties. However, the district court is not free to decide the case anew. Illegality of the challenged board action is established by reason of the court's findings of fact if they do not provide substantial support for the board decision. If the district court's findings of fact leave the reasonableness of the board's action open to a fair difference of opinion, the court may not substitute its decision for that of the board.
This court's scope of review on appeal from the trial court's judgment on a writ of certiorari is governed by Iowa Rule of Civil Procedure 318. Garman v. Ames Zoning Bd. of Adjustment, 436 N.W.2d 651, 653 (Iowa App.1988). We review the record to determine whether the trial court applied the correct legal standards and whether its decision is supported by substantial evidence. Id.
Certiorari is a procedure to test the legality of an action by a lower board, tribunal, or court. Lane v. Oxberger, 224 N.W.2d 245, 247 (Iowa 1974). It is an action at law and is not triable here de novo. City of Des Moines v. Iowa District Court for Polk County, 428 N.W.2d 292, 296 (Iowa 1988). Our scope of review is for errors of law. Trailer City, Inc. v. Board of Adjustment, 218 N.W.2d 645, 647-48 (Iowa 1974). The action of the trial court has the effect of a jury verdict. Id. We are bound by the trial court's findings of facts if supported by substantial evidence. Iowa R.App.P. 14(f)(1); Downs v. Board of Trustees of Police Retirement System of City of Sioux City, 312 N.W.2d 563, 566 (Iowa 1981).
We construe the trial court's findings broadly and liberally. Grinnell Mut. Reinsurance C. v. Voeltz, 431 N.W.2d 783, 785 (Iowa 1988). In case of doubt or ambiguity we construe the findings to uphold, rather than defeat, the trial court's judgment. Id. We are prohibited from weighing the evidence or the credibility of the witnesses. Id.
A finding of fact is supported by substantial evidence if the finding may be reasonably inferred from the evidence. In evaluating sufficiency of the evidence, we view it in its light most favorable to sustaining the court's judgment. We need only consider evidence favorable to the judgment, whether or not it was contradicted.
Briggs Transp. Co. v. Starr Sales Co., 262 N.W.2d 805, 808 (Iowa 1978).
Evidence is substantial or sufficient when a reasonable mind would accept it as adequate to reach the same findings. Waukon Auto v. Farmers & Merchants Sav. Bank, 440 N.W.2d 844, 846 (Iowa 1989). Evidence is not insubstantial merely because it could support contrary inferences. Grinnell Mut. Reinsurance Co., 431 N.W.2d at 785.

II.
With these principles in mind, we turn to the issues raised on appeal. The trial court *683 found the evidence insufficient to grant the variance for the proposed dog kennel. The trial court further found the actions of the Board in the conduct of its meetings to be so egregious as to justify imposition of costs.
There is evidence in the record the Board held a meeting on the Heddingers' property, apparently in the garage. The Wells were not welcome on Heddingers' property. The Wells indicated they would like to be included. The door to the garage was then shut.
Additionally, at a meeting later that same evening, the Wells and others attended a Board meeting. They had other evidence they desired to present. However, the Board had already reached a decision to grant the variance. The decision was not made at an open meeting as required by Iowa Code section 21.3. Nor was there a showing of unnecessary hardship as required by Iowa Code section 414.12(3). See Graziano v. Board of Adjustment of the City of Des Moines, 323 N.W.2d 233, 235-36 (Iowa 1982).
Our case law makes it plain that the burden to show unnecessary hardship is on the variance applicant....
If an applicant does not make the required unnecessary hardship showing, granting a variance is an "illegal" act by the board and the writ of certiorari should be granted. The board cannot alter the zoning ordinances by granting variance; it may not legislate. The power to change the zoning restrictions belongs to the zoning commission and the city council. [Case law] cautions that the power to grant variances should be used sparingly.
Id. at 237 (citations omitted).
There is evidence the Board did not consider a showing of unnecessary hardship a prerequisite for granting a variance. Such a showing is clearly required by the pertinent statutory and case law. The trial court's finding of insufficient evidence to grant a variance is supported by substantial evidence, and therefore illegal. We affirm the trial court on this issue.

III.
We further affirm the trial court's finding of a violation of Iowa's open meeting law, Iowa Code section 21.3. The trial court's finding in this matter is supported by substantial evidence in the record.
The trial court's finding the conduct of the Board "showed such gross negligence, bad faith and or malice that the cost of this action should be taxed to it" is supported by substantial evidence. We affirm on this issue.
The trial court is affirmed on all issues.
Cost of this appeal are taxed to the Board.
AFFIRMED.
