This is an appeal from a judgment of the Superior Court, which invalidated a special permit granted by the Amherst board of appeals. The permit allowed the defendant Charles D. Meakim to use a resident!ally zoned lot on Main Street as a parking area for a maximum of fourteen cars. One of the several conditions imposed was that the “[pjermit shall terminate” should Meakim’s nearby lot, which is zoned for commercial use, no longer be used for a commercial purpose. Several owners of homes appealed to the Superior Court pursuant to G. L. c. 40A, § 17, as appearing in St. 1975, c. 808, § 3. Following a hearing before a master and confirmation of his report, a judge entered the judgment appealed from on the ground that the decision of the board would allow the introduction of a nonresidential use into a residential area. The adequacy of the board’s findings was not questioned, the only question raised being whether the board’s action was authorized.
On appeal to the Superior Court, the judge is required to hear the matter de novo and to determine the legal validity of the board’s decision upon the facts found by him. G. L. c. 40A, § 17. Josephs v. Board of Appeals of Brookline, 362 Mass. 290, 295 (1972). The granting of a permit must be upheld if it is for a use that is “in harmony with the general purpose and intent of the ordinance or by-law,” G. L. c. 40A, § 9, as appearing in St. 1975, c. 808, § 3, and the decision does not rest on “a legally untenable ground” (Caruso v. Pastan, 1 Mass. App. Ct. 28, 29 [1973]) and is not unreasonable, whimsical or arbitrary. A court may not substitute its judgment for that of the board. Burnham v. Board of Appeals of Gloucester, 333 Mass. 114,120 (1955). Caruso v. Pastan, 1 Mass. App. Ct. at 29-30.
The Amherst zoning by-law authorizes the issuance of a special permit for a commercial parking lot in a residentially zoned area (§ III and Table *8571 and § IV(5)(o) [1974]) when the board finds that the standards for the issuance of a permit, as set out in § XI(4) of the by-law, are satisfied. On the facts of this case as found by the master and adopted by the judge, it cannot be said that the board exceeded its authority in finding that the standards for the granting of a special permit were met, nor can it be said that the board’s decision was the result of whim or caprice or, as the judge appears to have ruled in this case, that it permits a use not contemplated by the by-law.
David J. Giard, Jr., for Charles D. Meakim. Mary Ellen Niles for the plaintiffs.The judgment is reversed. A new judgment is to be entered that the board did not exceed its authority in granting the special permit and that the decision of the board is affirmed.
So ordered.