Petition for a declaratory judgment under RSA 491:22 brought against the town of Meredith by Nelson B. Piper, Jr., Nelmy Leasing, Inc., and PI Enterprises, Inc., as property owners and taxpayers, seeking a determination that a town ordinance regulating building heights is void, unconstitutional, without force of law, and inapplicable to plaintiffs.
The matter was heard by a Master (Jack B. Middleton, Esq.) who viewed the premises. The master made certain findings and rulings and recommended that the ordinance in question be declared invalid and without force of law. The master’s report was approved by Johnson, J. who entered a decree in accordance with the recommendation. The objections of the parties to the master’s report were overruled and their exceptions thereto and defendant’s exception to the court’s decree were reserved and transferred.
On September 6, 1968, the plaintiff, Nelmy Leasing, Inc., purchased from Meredith Yacht Club, Inc., for the sum of $ 160,000, a tract of land and buildings located on the shore of Lake Winnipesaukee in Meredith Bay. On the same day it leased the premises for a term of 99 years to plaintiff, PI Enterprises, Inc., to erect thereon eight nine-story condominium towers, now changed to five nine-story towers containing a total of 85 condominium units. Both plaintiff corporations are wholly owned by plaintiff Nelson B. Piper, Jr. and his associate, Myles L. Israel.
On September 23, 1968, more than 100 qualified voters of *293Meredith petitioned the Selectmen in writing to call a special meeting to act upon the following proposed town ordinance:
“In pursuance of authority conferred by RSA 31:60, and for the purpose of promoting the health, safety and general welfare of the community, and to secure safety from fires, panic and other dangers, to provide adequate light and air, to prevent the overcrowding of land, to avoid undue concentration of population and to facilitate the adequate provision of water, sewerage and other public requirements, it is hereby enacted, that
“ No buildings shall be erected in the Town of Meredith exceeding five stories or seventy-five feet in height; and no building shall be erected within fifty feet of any other building or within one hundred feet of the shore of any lake in Meredith, exceeding three stories or forty-five feet in height. ”
On the next day, September 24, 1968, the Selectmen called the special meeting requested in the petition for October 9, 1968 and duly posted and published the required warrant. RSA Ch. 39.
On October 4, 1968, plaintiffs filed in superior court a petition for injunction praying that the town be temporarily enjoined from holding the proposed town meeting and permanently enjoined from holding any future town meeting to act on the proposed ordinance until all necessary statutory prerequisites of a zoning ordinance had been met. The Trial Court (Loughlin, J. ) refused a temporary injunction but ruled “that any action taken by the petitionee [town] is violative of the requirements of Chapter 31, Sections 60-66 and is not valid under the general police power. ” JOn appeal this court held on March 20, 1969, that the above ruling constituted an advisory opinion which is not within the jurisdiction of the superior court. Piper v. Meredith, 109 N.H. 328, 330, 251 A.2d 328, 329.
The master found that “On October 9, 1968, the Special Town Meeting was held. Town counsel, Judge John Ramsey, attempted to explain to the citizens what had transpired with regard to the Petition for Injunction and attempted to answer questions posed by those present at the meeting. There is a dispute between the parties as to the action eventually taken at the meeting. The Plaintiffs say that the only action taken . . . was an expression of opinion. The Defendant claims that there was an overwhelming vote [209-35] in favor of the article set out in the Warrant . . . . ”
*294On October 10, 1968, plaintiff Piper obtained from the Town Clerk a document purporting to be a copy of the minutes of the above meeting. It refers to die action taken as an expression of opinion. On or about October 21 next, the Town Clerk undertook to revise the minutes to set forth a vote on the warrant article in question. The master ruled that defendant’s motion to amend the records in accordance with the revision should not be granted.
On April 15, 1969, another special town meeting was held for the purpose of ratifying the action taken at the October 9, 1968 meeting. The article in die warrant to diat effect was adopted by the voters, With respect to both the October 9, 1968 and the April 15, 1969 meetings, it is undisputed that the prerequisites for the adoption of a zoning ordinance were not met. RSA 31:63-a (supp) provides, among other requirements, that in the enactment of a zoning ordinance “diere shall be at least two public hearings at least fifteen days apart” with a notice of the time and place published in a paper of general circulation in the town.
The master ruled “that the ordinance in question constitutes a ‘ zoning regulation ’ which may be enacted only pursuant to the provisions of RSA 31:63-a as amended .... Since the prerequisites of publication and public hearings were not met at either the meeting of October 9, 1968 or at the meeting of April 15, 1969, die master rules that the ordinance is invalid and unenforceable. ” The superior court entered a decree accordingly.
Although the town admits that the requirements for the adoption of a zoning ordinance (RSA 31:63-a (supp) ) were not met, it maintains, however, that diese requirements do not apply to an ordinance adopted by the town in the exercise of its police powers (RSA 31:39) and that the master erroneously applied them to the present ordinance.
The governmental authority known as die police power is an inherent attribute of state sovereignty, Peirce v. New Hampshire, 5 How (U.S.) 554, 582 (1847); 16 Am. Jur. 2d Constitutional Law ss. 259, 260. The police power is broad and “includes such varied interests as public health, safety, morals, comfort, the protection of prosperity, and the general welfare. ” Corning Glass Works v. Max Dichter Co., 102 N.H. 505, 509, 161 A.2d 569, 573. “ [I]f it is to serve its purpose ... it must be of a flexible and expanding nature to protect the public against new dangers *295and to promote the general welfare by different methods than those formerly employed. ” and may include measures intended to promote the attractiveness of roadside scenery! Opinion of the Justices, 103 N.H. 268, 270, 169 A.2d 762, 764; Blevens v. Manchester, 103 N.H. 284, 289, 170 A.2d 121, 124; 6 McQuillin, Municipal Corporations s. 24.03 (1969 rev. vol.).
“ It is a long established principle under our law that towns are but subdivisions of the State and have only the powers the State grants to them. ” Exeter v. Kenick, 104 N.H. 168, 170, 181 A.2d 638, 640; Bisson v. Milford, 109 N.H. 287, 288, 249 A.2d 688, 689. It follows that towns have such powers as are expressly granted^to them by the legislature and such as are necessarily implied or incidental thereto. State v. Zetterberg, 109 N.H. 126, 129, 244 A.2d 188, 191; 37 Am. Jur. Municipal Corporations s. 277; 3A Antieau, Independent Local Government Entities s. 30A-05. See Watertown v. Meseberg, 144 N.W.2d 42, 44 (S. D. 1966). These granted powers must be interpreted and construed in the light of the police powers of the state which grants them. Haselton v. Stage Lines, 82 N.H. 327, 330, 133 A. 451, 452; State v. Jenkins, 102 N.H. 545, 546, 162 A.2d 613, 614; Frizzell v. Charlestown, 107 N.H. 286, 288, 220 A.2d 742, 744.
This court has held that towns are empowered under the authority granted by RSA 31:39 to make bylaws for a variety of purposes which generally fall into the category of health, welfare and public safety. State v. Jetterberg, supra. Setback ordinances, as well as ordinances regulating space between buildings and imposing limits on the height of buildings have been held generally to come within this police power of towns. 6 McQuillin, Municipal Corporations s\s\ 24.541,-.542,-.546,-.547. In Jaffrey v. Heffernan, 104 N.H. 249, 183 A.2d 246, this court held that an ordinance requiring buildings to have a minimum setback of 30 feet from any public highway could be legally adopted under the general police power of towns. This court also held in Deering v. Tibbetts, 105 N.H. 481, 202 A.2d 232, that a town ordinance prohibiting “the erection of any building or trailer within 1/4 mile of the Town Common, unless [the] Selectmen shall have approved in advance the plans for the construction and location of such building or trailer in order that the atmosphere of the Town of Deering may be maintained ” was a valid exercise of the police power granted the town by RSA 31:39.
*296It was further stated that the “ fact that aesthetic considerations . . . were also factors motivating the enactment is not fatal. ” Deering v. Tibbetts, supra at 484; 6 McQuillin, Municipal Corporations 55. 24.16, 24.33 (1969 rev. vol.). In so holding, this court stated that the promotion of the general economy, welfare, and prosperity of the town, and the value of privately-owned properties within it was a generally recognized basis for the exercise of the police power. RSA 31:39 confers upon towns not only the power to make bylaws “for the protection, preservation and use of the public . . . parks, commons, . . . and other public institutions” (Deering v. Tibbetts, supra), but also “for making and ordering their prudential affairs.” The latter provision is of ancient origin. While not defined by our decided cases, the breadth of the authority conferred thereby is evident from the context in which the provision was used in predecessor statutes, dating back in our sister state of Massachusetts to as early as 1692. See Willard v. Newburyport, 12 Pickering 227, 231. In our own statutes, the language appeared at least as early as 1719, when towns were empowered “to make and agree upon Such necessary Rules, orders and By Laws for the Directing Managing and ordering die Prudential affairs of Such Town as they Shall Judge most conducing to the Peace, Welfare, interest & good order.of the Town And the Inhabitants thereof. ” 2 Laws of New Hampshire 340, 341-42. The language was carried forward in a statute of the first constitutional period, enacted in February 1791. 5 Laws of New Hampshire 587, 591-92.
Plaintiffs, arguing against the validity of the Meredith ordinance as a valid, exercise of the town’s authority under RSA 31:39, point out that the objects and purposes of the present ordinance are found among the many purposes for which towns have been empowered to enact a zoning ordinance. RSA 31:60. They also correctly point to the fact that reference was made to the enabling law of zoning in the preamble to the present ordinance when it first was proposed for adoption at the town meeting of October 9, 1968. However, this same preamble also contained language consonant with the police powers granted to towns under RSA 31:39. Furthermore the purposes stated in the preamble, although entitled to weight, are not determinative of the type or constitutionality of the ordinance. Opinion of the Justices, 103 N.H. 268, 269, 169 A.2d 762, 763; 50 Am. Jur. Statutes 5. 309. See People v. Hempstead Bank, 304 N.Y.S.2d 276. Nor are the motives *297of the legislative body determinative of the validity of the ordinance. Stone v. Cray, 89 N.H. 483, 489, 200 A. 517, 522; Chicago National Bank v. City of Chicago Heights, 14 Ill. 2d 135, 150 N.E.2d 827; See Annot., 71 A.L.R.2d 568.
Whether of not a particular law is a zoning measure subject to the prerequisites for the enactment of such an ordinance (RSA 31:63 - a ( supp ) ) or is an expression of some other phase of the police power, not so subject, is to be determined by the nature and purpose of the particular enactment. 8 McQuillin, Municipal Corporations 5. 25.10 ( 1965 rev. vol.). See American Sign Corporation v. Fowler, 276 S.W.2d 651 (Ky. Ct. App. 1955). This determination is to be made on a consideration of the special facts of die specific ordinance. Stone v. Cray, supra at 485.
The ordinance in question provides for an overall height limitation on buildings in the town of five stories or seventy-five feet in height. It further limits the height to three stories or forty-five feet if the building is within fifty feet of another building or one hundred feet of the shore of any lake. The town adverts to die fact diat Meredith Bay of Lake Winnipesaukee is a public body of water owned by the public at large and widely used for recreation and boating. State v. Stafford Company, 99 N.H. 92, 97, 105 A.2d 569, 572; RSA 271:20. It argues that the preservation of its shore line from unrestricted exploitation, despoliation and excessive concentration of population, intended by the ordinance, falls within die general scope of the protection of “ parks, commons and other public institutions of the town ” for which it is granted specific powers by RSA 31:39. State v. Zetterberg, 109 N.H. 126, 224 A.2d 188; Deering v. Tibbetts, 105 N.H. 481, 484, 202 A.2d 232, 235.
The town also points out that Meredith is an area of great natural beauty whose normal population of about 2800 expands to between 12,000 to 15,000 in the summer season. It maintains that “The congestion of summer population in high-rise buildings quite close to the limited amount of undeveloped shore lines of New Hampshire lakes presents obvious problems affecting the public health, safety and welfare ” the regulation of which comes within the powers granted under RSA 31:39. State v. Jenkins, 102 N.H. 545, 546, 162 A.2d 613, 614; 7 McQuillin, Municipal Corporations s. 24.547 (1968 rev. vol.).
The town further maintains that aesthetics or the appearance of a community which this ordinance seeks to preserve is also *298a proper consideration, at least among others, if not alone, to justify the exercise of its police power under RSA 31:39. Deering v. Tibbetts, 105 N.H. 481, 484, 485, 202 A.2d 232, 235; 6 McQuillin, Municipal Corporations 5. 24.15 (1969 rev. vol.). See Annot, 21 A.L.R.3d 1222.
Under familiar principles of law, the presumptions favor the validity of the ordinance and the burden of establishing its unconstitutionality is on the plaintiffs. State v. Grant, 107 N.H. 1, 3, 216 A.2d 790, 791; Rochester v. Barcomb, 103 N.H. 247, 253, 169 A.2d 281, 285. If any fair reason can be given for including it within the scope of the police powers granted under RSA 31:39 it must be upheld. Corning Glass Works v. Dichter Co., 102 N.H. 505, 509, 510, 161 A.2d 569, 573. Plaintiffs have made no claim of any defect with respect to the procedure necessary to adopt it under that section and the master properly held that any ambiguity as to whether or not it was adopted at the town meeting of October 9, 1968 was cured at the meeting of April 15, 1969. Plainfield v. Hood, 108 N.H. 502, 240 A.2d 60.
We hold that tire ordinance in this case is in the category of the ordinances in the Heffernan and Deering cases. The first regulating the setback of buildings from a public highway. The latter regulating the construction and location of buildings in a certain area of town. It differs from the ordinance in Bisson v. Milford, 109 N.H. 287, 249 A.2d 688, declared to be a zoning ordinance. The primary purpose of the latter was found to be to restrict die use in three areas of the town to single and two family residential buildings with “ comprehensive regulations ”to effectuate this purpose.
We hold further that the Meredith ordinance comes within the police.powers granted to the town by RSA 31:39 to protect its public institutions and to promote the general economy, welfare and prosperity of the town. Deering v. Tibbetts, 105 N.H. 481, 202 A.2d 232. See Plainfield v. Hood, 108 N.H. 502, 506, 240 A.2d 60, 64. We sustain the town’s exception to the decree of the superior court, adopting the recommendation of the master, declaring the ordinance invalid and without force of law.
If the town could adopt the ordinance without observing the notice and requirements of RSA 31:63 - a ( supp ), as we are holding, the master found and ruled that the ordinance was effective as of April 15, 1969 and applies to plaintiffs’ project *299unless it had progressed to the point that their interests in it had vested. The master properly found and ruled that prior to October 9, 1968, the date of the first town meeting, the town had no ordinance, rules or regulations which would have prevented plaintiff PI Enterprises from proceeding with its project. The master also properly found and ruled that the project as originally planned, or as presently modified, will be in violation of the provisions of the ordinance.
The master found that during the period from June 1, 1968 to October 1, 1968, the plaintiffs expended approximately $40,000 on the project for borings, surveys, a rendition of the proposed buildings, preliminary plans, land clearing, overhead, administration and sales expenses. During the period from October 1, 1968 to May 1, 1969 the master found that according to plaintiffs’ evidence they had expended an additional $ 100,000, exclusive of the original land acquisition, for a total of approximately $ 140,000, against the total cost of the project estimated to be $ 1,700,000 exclusive of land acquisition and engineering.
This court has adopted the rule, which prevails in many other jurisdictions, that an owner, who, relying in good faith on the absence of any regulation which would prohibit his proposed project, has made substantial construction on the property or has incurred substantial liabilities relating directly thereto, or both, acquires a vested right to complete his project in spite of the subsequent adoption of an ordinance prohibiting the same. Winn v. Corporation, 100 N.H. 280, 281, 124 A.2d 211, 213; Bosse v. Portsmouth, 107 N.H. 523, 532, 226 A.2d 99, 105; 8 McQuillin, Municipal Corporations s. 25.157 (1965 rev. vol.).
In determining whether plaintiffs had acquired such a vested right, the master properly excluded the acquisition price of the land and its lessened value for uses other than that intended by the plaintiffs. Money spent for the purchase of land does not change its use nor create a right to use it for an intended, but not executed, use when restrictions are imposed. It is, rather, the amount of money spent on improvements to change the use of the land in a tangible way which if substantial enough and done in good faith will create a vested right which cannot be affected by the enactment of a restrictive ordinance. City of Rutland v. Keiffer, 124 Vt. 357, 365, 205 A.2d 400, 405. 8A McQuillin, Municipal Corporations s. 25.181 ( supp ).
In this case a petition for a special meeting to adopt the present *300ordinance was filed with the Selectmen on September 23, 1968. Plaintiffs filed a petition to enjoin a town meeting thereon on October 4 and a ruling was made October 8. The meeting was held October 9 at which time a majority of those present either expressed an opinion or voted in favor of the ordinance, which created a controversy about the minutes of this meeting. The master could properly find and rule that plaintiffs knew at least by October 28, 1968, about a contention that the ordinance had been adopted at the meeting of October 9th. Prior to October 28 plaintiffs had expended about $28,000. These factors were sufficient to support the master’s finding and ruling that the plaintiffs took a “ calculated risk ” in proceeding with the project, that is, that they were not relying in good faith on the non-adoption of the ordinance. Bosse v. Portsmouth, supra at 532; City of Tucson v. Arizona Mortuary, 34 Ariz. 495, 272 P. 923; 8 McQuillin, Municipal Corporations 5. 25.157 ( 1965 rev. vol.); 2 Rathkopf, Law of Zoning and Planning 57-26.
As to the effect of plaintiffs’ expenditures, each case presents a question of fact peculiar to its own set of circumstances. The ultimate objective is fairness both to the public and to the individual property owners. Tremarco Corporation v. Garzio, 32 N.J. 448, 457, 161 A.2d 241, 245. Under all the circumstances of this case, we hold that the master could properly find and rule that, as of April 15, 1969, when the ordinance was ratified, the plaintiffs had acquired no vested rights to continue the project except in accordance with the restrictions imposed by the ordinance. Winn v. Corporation, 100 N.H. 280, 124 A.2d 211; Rochester v. Barcomb, 103 N.H. 247, 169 A.2d 281; Bosse v. Portsmouth, 107 N.H. 523, 532, 226 A.2d 99, 107.
In view of the result reached it is unnecessary to consider other issues raised by the parties.
Decree vacated and plaintiffs’ exceptions overruled, fudgment for defendant.
Grimes, J., dissented; the others concurred.