OPINION OF THE COURT
Harwood, J. This appeal provides the opportunity to remind municipalities that because educational institutions presumptively serve a beneficial public purpose, local governments may not unreasonably prohibit accessory uses of school premises. Since the appellants failed to recognize the petitioner’s special status when determining its application for a variance to enable it to install swimming facilities, we agree with the Supreme Court that their determination absolutely denying the application must be annulled.
The appellants are members of the Zoning Board of Appeals for the Village of Hewlett Bay Park. The Village’s zoning ordinance authorizes only residential uses of property (see, Hewlett Bay Park Code § 146-6), although property owners are permitted to construct swimming pools as long as the Village Board of Trustees issues a permit after determining that "the public health, safety, comfort and welfare will be secure and that such swimming pool will not be detrimental to the *44general character of the district or to the orderly development of the village” (Hewlett Bay Park Code § 146-9 [C] [2]). The petitioner is a day school located on almost 10 acres within the Village. Its existence predates enactment of the zoning ordinance and its use is thus a nonconforming one.
In 1988 the petitioner applied for and, following hearing and imposition of various conditions, the Village Board of Trustees granted a permit authorizing it to build two swimming pools on its nearly 10-acre plot. Community opposition erupted, however, and the permit was revoked on the stated ground that the petitioner intended to operate a summer camp rather than an educational program. The petitioner commenced litigation challenging the revocation as arbitrary and capricious and was initially successful. However, the Village amended the zoning ordinance concerning continuation of nonconforming uses to provide that "no such use, building or structure shall be altered, enlarged or otherwise expanded” (Hewlett Bay Park Code § 146-3). The Supreme Court subsequently ruled that, in light of the amendment, reargument should be granted and the proceeding by which the petitioner challenged the revocation of the permit was dismissed. That determination was affirmed by this court on the limited grounds that the petitioner had acquired no vested rights in the permit and that it had shown no basis for an estoppel (see, Matter of Lawrence School Corp. v Morris, 167 AD2d 467).
The petitioner applied for a variance of the prohibition against altering, enlarging and expanding its use of the school. At the outset of the hearing on this application, the Village Attorney acknowledged that environmental review and a referral to the Nassau County Planning Commission were required (see, ECL art 8; see also, General Municipal Law § 239-m), although it appears that no referral and no review of the petitioner’s environmental statements has been made. The petitioner presented evidence of its financial need to increase its summer enrollment, that it expected that the addition of the swimming pools would enable it to do so, that it had present capacity for 800 students, that current enrollment for its already-existing summer program was 157, that it hoped to expand its summer program to a maximum of 450 students, that its summer program would be academic in nature and would include courses in reading, music, home economics, art, astronomy, geology, and computer programming and usage, and that there would be athletic instruction and recreational *45activities, including soccer, softball, field hockey, lacrosse, and swimming. The petitioner also presented expert evidence as to the negligible impact the addition of the pools would have on traffic patterns and on the value of neighboring properties. Some residents spoke in favor of the application. Although the school itself is apparently in keeping with the character of, and is generally acceptable to, residents of the Village, and although the appellants concede that the petitioner may lawfully expand its summer educational program by increasing its enrollment to full capacity, most residents who spoke opposed construction of the swimming pools. One such resident stated that she sold real estate in the area and that property values would fall if the pools were built.
The Zoning Board of Appeals denied the application on the ground that the petitioner’s financial hardship, if any, was self-created and that the adverse effects of the pools on the community in any event mandated denial of the application. The Board also found that the proposed "activity” was a "commercial camp in disguise”, declined to determine whether the environmental assessment forms that the petitioner had submitted were sufficient and complete, and declined to make a referral to the Nassau County Planning Commission, ruling that the environmental review procedures were not necessary because the application was being denied.
Upon the petitioner’s judicial challenge to this determination pursuant to CPLR article 78, the Supreme Court ruled that the denial of the variance was arbitrary and capricious and, in effect, directed the appellants to issue a special permit for construction of the pools after further hearings as to the conditions to be imposed. It also directed the appellants to conduct an environmental review and to refer the matter to the Nassau County Planning Commission, although it made no provision for the possibility that either process could culminate in recommendations or findings that the pools should not be allowed. It further directed that the appellants complete these processes and render a decision within a specified period of time. This appeal ensued.
Although the function of the courts in reviewing determinations granting or denying variances is somewhat limited (Matter of Fuhst v Foley, 45 NY2d 441; Matter of Perlman v Board of Appeals, 173 AD2d 832), a determination which is arbitrary and capricious or unsupported by substantial evidence will not be upheld (cf., Matter of Perlman v Board of Appeals, supra). But while we agree with the Supreme Court that the determi*46nation at issue here cannot stand, we also conclude that a directive that the appellants presently authorize the construction of the swimming pools is premature.
It is established law that educational institutions, like religious institutions, enjoy special treatment with respect to residential zoning ordinances because these institutions presumptively serve the public’s welfare and morals (see, Cornell Univ. v Bagnardi, 68 NY2d 583; see also, Matter of Diocese of Rochester v Planning Bd., 1 NY2d 508). It is also established law that a school offering a summer program need not exactly duplicate the September-to-June curriculum in order to retain its "educational” character (see, Rorie v Woodmere Academy, 52 NY2d 200; Matter of Summit School v Neugent, 82 AD2d 463). Moreover, educational and religious institutions are generally entitled to locate on their property facilities for such social, recreational, athletic and other accessory uses as are reasonably associated with their educational or religious purposes (see e.g., Matter of Brown v Board of Trustees, 303 NY 484, 489; see also, Matter of Community Synagogue v Bates, 1 NY2d 445; Shaffer v Temple Beth Emeth, 198 App Div 607; Matter of Summit School v Neugent, supra). And while such institutions are not exempt from compliance with a zoning ordinance (see, Cornell Univ. v Bagnardi, supra, at 594; see also, Matter of Harrison Orthodox Minyan v Town Bd., 159 AD2d 572), neither are they required to affirmatively demonstrate a special "need” for any expansion (Cornell Univ. v Bagnardi, supra, at 596-597). Greater flexibility than would attach to applications for variances made by commercial institutions is required and the "controlling consideration * * * must always be the over-all impact on the public’s welfare” (Cornell Univ. v Bagnardi, supra, at 595).
We conclude that the appellants’ determination that the petitioner is operating or intends to operate a "commercial camp” is totally without evidentiary basis (cf., Rorie v Wood-mere Academy, supra; Matter of Summit School v Neugent, supra). Similarly without evidentiary basis is the determination that the swimming pools will adversely affect the surrounding community, particularly since the appellants concede that an increase in enrollment, regardless of whether or not the pools are installed, cannot be prohibited. It is also evident that the appellants used impermissible criteria in determining whether the application should be granted (see, Cornell Univ. v Bagnardi, supra) and from the appellants’ failure at the outset to pay heed to the requirements of ECL *47article 8 and General Municipal Law § 239-m, we can infer only that outright denial of the application was virtually a foregone conclusion and was thus arbitrary and capricious.
Since no persuasive expert or other evidence was offered to demonstrate that the addition of two pools would have a significant adverse impact on, among other things, traffic patterns, property values, or municipal services (see, Cornell Univ. v Bagnardi, 68 NY2d 583, 595, supra; see also, Matter of North Syracuse First Baptist Church v Village of N. Syracuse, 136 AD2d 942), and since it would appear that reasonable conditions could both alleviate community hostility and address bona fide public welfare considerations, it would appear that the Supreme Court was otherwise correct in granting the petition and remitting the matter for consideration of appropriate conditions. Since this case involves the expansion of a prior nonconforming use to allow the construction of swimming pools, the authorization to do so must emanate from the appellants in the form of a variance with conditions, rather than in the form of a special permit which could be issued by the Board of Trustees. In any event, however, we also note that review of the petitioner’s environmental assessment statements which should have been undertaken as early in the process as was possible (see, ECL 8-0109 [4]) and referral to the Nassau County Planning Commission which must precede any final action (see, Matter of Old Dock Assocs. v Sullivan, 150 AD2d 695; see also, General Municipal Law § 239-m) have not been effectuated and we therefore remit the matter to the appellants for completion of the necessary procedures and a new determination in accordance herewith.
We direct that the appellants complete the necessary procedures with all deliberate speed and we thus discern no basis for disturbing the timetable fixed by the Supreme Court. We have also considered the appellants’ remaining contentions and find them to be without merit.
Kunzeman, J. P., Eiber and Balletta, JJ., concur.
Ordered that the order is modified, on the law, by inserting in the first decretal paragraph after the word "granted” the words "to the extent that the Respondents’ determination is annulled” and by deleting the second decretal paragraph, and substituting therefor a direction that the matter be remitted to the appellants for further proceedings and a new determination; as so modified, the order is affirmed, without costs or disbursements.