The question for decision in this case is whether a “person aggrieved” within the meaning of G. L. c. 40A, § 17, as amended by St. 1978, c. 478, § 32,2 is en*104titled to judicial review of a decision of a board of appeals by which it expressly grants a petition for a variance if that person files a complaint for such review within twenty days of the date when the board files a copy of its decision with the city or town clerk but more than twenty days after the date when the board has constructively granted the petition by reason of its failure to act thereon within the seventy-five-day period set out in the concluding paragraph of G. L. c. 40A, § 15.3 We hold that the plaintiff in this particular case is entitled to judicial review.
The jurisdictional facts are not in dispute. On February 27, 1980, the owners of the locus filed with the town clerk of Hingham (see c. 40A, § 15, second par.) a petition for a minuscular variance from the applicable side-yard requirement of the town’s zoning by-law in order to accommodate an industrial building which had recently been constructed. See c. 40A, §§ 10 and 14(3). For some reason which does not appear in the record but which is immaterial for present purposes, the town clerk failed to transmit a copy of the petition to the board of appeals (see c. 40A, § 15, second par.) until the latter part of April. The board held a public hearing on the petition on May 15 but took no action at that time. On July 24 the plaintiff, who is an abutter of the locus, brought a complaint in the *105Superior Court against the board and the owners of the locus in which he prayed for an order requiring the board to render and file a decision, for a determination of the invalidity of any variance that might have been constructively granted under c. 40A, § 15, and for injunctive relief with respect to a supposed violation of the side-yard requirement of the zoning by-law.4 At some point during the last week in July the board rendered a written decision in which it expressly granted the requested variance. A copy of that decision was filed with the town clerk on August 5. On the following day the town clerk, apparently acting in behalf of the clerk of the board, mailed the written notices of the decision which are required by c. 40A, § 15.
On August 21, pursuant to leave first obtained, the plaintiff filed an amended complaint in the Superior Court in which he sought to annul the written decision of the board (a certified copy of which was attached) and again sought injunctive relief with respect to a supposed violation of the by-law. The owners and the board appeared and answered the amended complaint. The owners (but not the board) filed a motion to dismiss the action as “untimely.”5 That motion was allowed, and the plaintiff appealed from the ensuing judgment.6
*106We deal first with the owners’ contention that the action was properly dismissed because the plaintiff failed to file a complaint for judicial review within twenty days7 following the date (May 12, 19808) when the board constructively granted their petition under the concluding paragraph of c. 40A, § 15 (note 3, supra). At the time this case was before the Superior Court neither of our appellate courts had had occasion to determine the meaning or effect of the second and third sentences of that paragraph. In Casasanta v. Zoning Bd. of Appeals of Milford, 377 Mass. 67 (1979), the Supreme Judicial Court had noted the apparent distinction between the language of those sentences and that of c. 40A, § 18, as in effect prior to St. 1975, c. 808, § 3 (377 Mass. at 69-70) but had found it unnecessary to construe the new language in the case then before it. Not long after the decision in the Casasanta case this court, in Brown v. Board of Appeals of Manchester, 8 Mass. App. Ct. 929 (1979), reversed a judgment of the Superior Court which had dismissed an appeal to that court on the ground that it had *107not been filed within twenty days of what the judge concluded was a constructive grant of a variance under the new § 15; however, we did so on the grounds that the new section had not yet taken effect and that the appeal was governed by the provisions of c. 40A, § 21, as in effect prior to St. 1975, c. 808, § 3. There was no occasion to construe the language of § 15. The language of that section had again been noted but left for another day in Fitchburg Housing Authy. v. Board of Zoning Appeals of Fitchburg, 380 Mass. 869, 871 n.4 (1980).
Following the entry of the judgment in the present case the Supreme Judicial Court, in a case which had come to a board of appeals by way of an appeal under c. 40A, §§ 8, 14(1) and 15 (first para.), held that “[t]he language of [the second and third sentences of the concluding paragraph of] c. 40A, § 15, obligates a board of appeals to act on an appeal within the statutory time period, otherwise the appellant prevails by default.” Rinaudo v. Zoning Bd. of Appeals of Plymouth, 383 Mass. 885 (1981). More recently, in Building Inspector of Attleboro v. Attleboro Landfill, Inc., 384 Mass. 109 (1981), it was held that the failure of a planning board which was acting as a special permit granting authority (see c. 40A, § 1A, inserted by St. 1977, c. 829, § 3A; c. 40A, § 9, first par.) to file a copy of its written decision on an application for a special permit with the city clerk within the ninety-day period set out in the seventh paragraph of § 9 (as amended by St. 1977, c. 829, § 3F) resulted in a constructive grant of the application for the permit.9 In reaching that conclusion the court expressly *108relied on the portions of the Casasanta and Rinaudo cases already referred to as support for the proposition that “[i]t is . . . mandatory that the board act within the statutory period, otherwise the applicant prevails by default.” 384 Mass. at 110. We conclude, therefore, that, as between the owners and the board of appeals in the present case, the latter must be taken to have constructively granted the petition for a variance as early as May 13, 1980.
It does not follow from the foregoing, as the owners argue and the judge apparently believed, that one in the position of the present plaintiff is precluded from securing judicial review of a constructive grant of a petition for a variance or of a subsequently filed written decision which expressly grants a variance merely because he fails to run off to an appropriate courthouse within twenty days of the date of the constructive grant. It must be recognized that the Casasanta, Rinaudo and Attleboro cases were all concerned with the rights and duties of a landowner in relation to the municipal authorities and that none of those cases was concerned with the rights of someone else (such as the present plaintiff) who might be aggrieved by the constructive grant of a variance or a special permit. It must also be recognized that in the Attleboro case the court gave the need for certainty as to when the appeal period would start running under § 17 as one of its reasons for construing the words “final action” in § 9 (note 9, supra) to include the filing of a board’s decision with a city or town clerk. Indeed, the court specifically said that “unless the board’s decision is filed with the clerk, there would be no commencement of the statutory time within which appeals may be taken.” 384 Mass. at 111-112.
It is with that insight that we turn to the express language of the appeal provisions found in the present c. 40A, §§15 and 17. When we do so, we find in the very sentence of § 15 which provides for the constructive grant of a variance that such a grant is “subject to an applicable judicial appeal as provided for in this chapter” (note 3, supra); we also find in the ultimate sentence of that section that the notice *109which is to be given to the petitioner (among others) of the decision which is to be filed with the city or town clerk “shall specify that appeals . . . shall be made pursuant to section seventeen and shall be filed within twenty days after the date of filing of such notice [sic] in the office of [the] city or town clerk.” In the first paragraph of § 17, both in its original form and as now in effect, we find the sole grant of jurisdiction to any court to entertain an appeal from and to review a decision of a board of appeals or a special permit granting authority. That paragraph is explicit that an appeal by a “person aggrieved” is to be taken by “bringing an action within twenty days after the decision has been filed in the office of the city or town clerk” and that “[t]here shall be attached to the complaint a copy of the decision appealed from, bearing the date of filing thereof, certified by the city or town clerk with whom the decision was filed” (note 7, supra). Unlike the cognate provisions of the Subdivision Control Law, § 17 contains no provision authorizing or requiring the taking of an appeal within twenty days of a constructive approval. See and contrast G. L. c. 41, §§ 81U, 81V and 81BB, as now in effect.10
In the case before us the plaintiff’s original complaint sought to attack the constructive grant of the petition for a variance which arose out of the board’s failure to take any action on the petition within the seventy-five-day period set out in § 15. Well within the twenty-day period following the date on which the board filed its decision with the town clerk, the plaintiff secured an amendment of his complaint *110so as to attack an express decision which (in effect) confirmed the earlier constructive grant of a variance and belatedly explained the reasons therefor. All the defendants appeared and answered the amended complaint without raising any question as to the manner or timeliness of the service of process. We conclude that in the circumstances of this particular case the Superior Court has jurisdiction to entertain the amended complaint, and we reserve for another day the questions of how and when review can be had in a case in which a board of appeals or a special permit granting authority fails to take any action on a petition or application or, if it does act, fails to file its decision with the city or town clerk.11
The judgment is reversed, and the case is to stand for further proceedings in the Superior Court; costs of appeal are not to be awarded to any party.
So ordered.
Except as otherwise indicated, all references to the provisions of c. 40A will be to the provisions of that chapter as they appear in St. 1975, c. 808, § 3.
That paragraph reads in material part as follows: “All hearings of the board of appeals shall be open to the public. The decision of the board shall be made within seventy-five days after the date of the filing of an appeal, application or petition except in regard to special permits, as provided for in section nine of this chapter. Failure by the board to act within said seventy-five days shall be deemed to be the grant of the relief, application or petition sought, subject to an applicable judicial appeal as provided for in this chapter. The board shall cause to be made a detailed record of its proceedings . . . setting forth clearly the reason or reasons for its decision and of its official actions, copies of all of which shall be filed within fourteen days in the office of the city or town clerk and shall be a public record; and notice of the decision shall be mailed forthwith to the petitioner, applicant or appellant, to the parties in interest designated in section eleven, and to every person present at the hearing who requested that notice be sent to him .... Each notice shall specify that appeals, if any, shall be made pursuant to section seventeen and shall be filed within twenty days after the date of filing of such notice [sic] in the office of [the] city or town clerk.” (Emphases supplied.)
The plaintiff was clearly not entitled to any injunctive relief because he had not pursued any of the administrative remedies delineated in Neuhaus v. Building Inspector of Marlborough, 11 Mass. App. Ct. 230 (1981).
The motion was styled as one for summary judgment under Mass.R.Civ.P. 56, 365 Mass. 824 (1974), but we join the parties in treating the motion as one to dismiss for lack of jurisdiction under Mass.R.Civ.P. 12(b)(1) or 12(h)(3), 365 Mass. 755, 757 (1974).
The judgment actually entered was made up on a form commonly used when declaratory relief is granted under rule 56 and contains a determination that the decision of the board was not in excess of its authority. We are at a loss to understand how the judge reached the merits of a case he had ordered dismissed. There was no motion addressed to the merits; the record is devoid of any of the types of papers on which motions under Mass.R.Civ.P. 56(c), 365 Mass. 824 (1974), are normally decided; and the record contains no statement of the proceedings at the hearing on the motion to dismiss (see Mass.R.A.P. 8[c], as amended, *106378 Mass. 933 [1979]) which would permit us to conclude that the parties agreed to submit the case for a decision on the merits which would be based on the facts found by the board and recited in its decision. This is not to say that we are unsympathetic to the judge’s view of the merits of this controversy. If the facts recited by the board are accurate and constitute all the material facts, the board could not properly have denied the variance requested in this case. See and compare Lombard v. Board of Appeal of Wellesley, 348 Mass. 788 (1965).
The twenty-day period is precariously extrapolated from the present first paragraph of c. 40A, § 17, which reads in material part as follows: “Any person aggrieved by a decision of the board of appeals or any special permit granting authority, whether or not previously a party to the proceeding, . . . may appeal to the superior court department ... by bringing an action within twenty days after the decision has been filed in the office of the city or town clerk. . . . There shall be attached to the complaint a copy of the decision appealed from, bearing the date of filing thereof, certified by the city or town clerk with whom the decision was filed.” (Emphases supplied.)
As 1980 was a leap year, May 12, 1980, was the seventy-fifth day following the filing with the town clerk on February 27,1980. As already stated, the plaintiff’s original complaint was not filed in the Superior Court until July 24, 1980.
That paragraph provides in the part here material as follows: “Zoning ordinances or by-laws shall provide that special permits shall only be issued following public hearings held within sixty-five days after filing of an application with the special permit granting authority, a copy of which shall forthwith be given to the city or town clerk by the applicant .... Special permit granting authorities shall act within ninety days following a public hearing .... Failure by a special permit granting authority to take final action upon an application for a special permit within said ninety days following the date of public hearing shall be deemed to be a grant of the permit applied for.”
The difficulties in this case appear to stem from the facts (a) that § 17 carries over from the former § 21 the concept of an appeal period which runs from the date of the filing of a decision of a board of appeals with a city or town clerk and (b) that the provisions for the constructive grants of special permits and variances were inserted late in the legislative process without recognizing the need for a change in § 17 which would provide alternative appeal periods comparable to those in c. 41, § 81BB. See 1975 House Doc. No. 5600, at 14, 21; 1975 Senate Journal at 2211, 2215; 1975 House Journal at 2939, 2943, 3037-3038; 1975 House Doc. No. 6849; St. 1975, c. 808, at 1124, 1128-1129, 1130.
See Tanzilli v. Casassa, 324 Mass. 113, 114-115 (1949).