*267The Opinion of the Court was delivered by
PASHMAN, J.This appeal is a companion case to Dome Realty, Inc. v. City of Paterson, 83 N.J. 212 (1980), and Orange Taxpayers Council v. City of Orange, 83 N.J. 246 (1980), also decided today. Here we consider the validity of an amendment to a municipal zoning ordinance that requires the issuance of a certificate of occupancy before a new occupant may take possession of rented premises within a multiple-dwelling residence.
On October 20, 1970, the Borough of Little Ferry enacted Ordinance # 375 to supplement and amend the borough’s zoning ordinance. As amended, Article 10, Subsection 10:2-3 of the zoning ordinance provided in part:
In the event any building, dwelling unit in a multi-family dwelling house, or part thereof, shall become vacant, or, in the event that there is a change of tenants or occupants thereof, said building, dwelling unit in a multi-family dwelling house, or part thereof shall not be reoccupied by a new or subsequent tenant or occupant unless a Certificate of Occupancy has been issued specifically for said new tenant or occupant. Any such vacancy or change of occupants or tenants shall render null and void any Certificate of Occupancy that had been previously issued for said building, dwelling unit or part thereof.
Another portion of the ordinance specifically exempted one- and two-family dwellings from the certification requirement.
The ordinance empowered the borough’s Building Inspector to issue certificates of occupancy indicating “that the building or dwelling unit has complied with the provisions of [the zoning] Ordinance and such other ordinances of the Borough of Little Ferry as may be applicable.” The ordinance placed responsibility for procuring a new certificate upon the landlord. Although it provided that the landlord must notify the Building Inspector “within forty-eight hours of any vacancy,” the ordinance did not establish a detailed procedure for the issuance of new certificates. It required that after the landlord submitted an application with a fee of $5 to the Building Inspector, the latter would either issue a certificate or provide a written denial “setting forth any and all reasons for the refusal” within 48 hours.
Defendant C.I.B. International owned and operated the “Florence Gardens” apartment complex on Liberty Street in Little Ferry. On January 7,1978, the borough’s Housing Inspector, an *268official of the municipal Board of Health, found a defective toilet flush system in Apartment 14 of the complex. He returned to the apartment on January 30 and found that defendant had not repaired the toilet. Between the time of original inspection and a third visit by the official on February 8,1 a new tenant had moved in, but a new certificate of occupancy had not been issued because of the broken flush system.
On February 4, 1978, the Housing Inspector filed a criminal complaint against defendant in Little Ferry Municipal Court. Alleging a violation of Ordinance # 375, the complaint stated that C.I.B. International had failed to obtain a new certificate for Apartment 14 and had “re-rented [the] premises prior to inspection to determine compliance” with the necessary repairs.
At the commencement of the trial in municipal court on February 27, 1978, defendant moved for dismissal of the complaint on the grounds that Ordinance # 375 was invalid and unconstitutional. See R. 7:4-2{e); R. 3:10-3. The court reserved immediate decision on the motion but denied it at the end of the State’s case. At the conclusion of the trial on April 3, 1978, the court found defendant guilty and imposed a fine of $100 plus $15 in costs. Defendant appealed to the former Bergen County Court, which held a trial de novo on the record in the municipal court. Rejecting the landlord’s renewed arguments concerning the validity of the Little Ferry ordinance, the court found defendant guilty and imposed sanctions identical to those levied by the municipal court.
In its appeal to the Appellate Division, defendant urged three specific grounds for reversal of the conviction:
that the Little Ferry zoning ordinance provision (a) is an invalid attempt by the municipality to utilize certificates of occupancy to enforce health ordinances; (b) unconstitutionally discriminates and denies equal protection of the laws to owners of multi-family dwellings, and (c) is invalid because the State has *269preempted the field of multiple-family dwelling regulation by its enactment of the Hotel and Multiple Dwelling Law, N.J.S.A. 55:13A-1 et seq. [State v. C.I.B. International, 169 N.J.Snper. 69, 71 (App.Div.1979)]
In a per curiam opinion, the Appellate Division reversed the conviction on the first enumerated ground without reaching defendant’s other claims. Id. Relying upon this Court’s decision in Dresner v. Carrara, 69 N.J. 237 (1976), the court found no statutory authorization for a requirement in a local zoning ordinance that a new certificate of occupancy be issued upon a new lease of residential property. 169 N.J.Super. at 72. As additional defects in the Little Ferry ordinance, the Appellate Division cited the lack of authority for employing either a zoning ordinance or a municipal building inspector to enforce health regulations. Id. The court also observed that the certification requirement deprived the landlord of the use of its property without prior notice or an opportunity to be heard on the presence of violations. Id.
This Court granted plaintiff’s petition for certification. 81 N.J. 345 (1979). We now reverse the Appellate Division and reinstate the conviction.
Our opinion today in Dome Realty, supra, addresses the principal issue upon which the Appellate Division based its decision in this case—whether regulating the conditions of residential dwellings by means of successive certificates of occupancy is beyond a municipality’s delegated authority. In Dome Realty we observed that our earlier decision in Dresner v. Carrara, supra, reserved this question. See Dome Realty, 83 N.J. at 231-232; Dresner, 69 N.J. at 243. The court in Dresner listed several conventional functions for certificates of occupancy, see id. at 242, but noted that “[tjhere may be, or there may later develop, other occasions when such a certificate will serve a useful and valid end in land use control.” Id. at 243. Finding the present circumstances to constitute such an occasion, we reject the Appellate Division’s view that Dresner renders Little Ferry’s use of these certificates invalid.
At present the regulatory scheme embodied in Ordinance # 375 is expressly authorized by N.J.S.A. 40:48-2.12m, see L. *2701979, c. 476; Dome Realty, 83 N.J. at 227-228. However, this new statute, which became law on February 27, 1980, see L. 1979, c. 476, § 2, cannot serve to validate defendant’s prior conviction for violating the ordinance. Such a retroactive application of legislation authorizing local criminal prohibitions would violate the Ex Post Facto Clauses of the Federal and State Constitutions. U.S.Const., Art. I, § 10, cl. 1; N.J.Const. (1947), Art. IV, § 7, par. 3. See Dobbert v. Florida, 432 U.S. 282, 292, 97 S.Ct. 2290, 2297, 53 L.Ed.2d 344 (1977); State v. Donato, 106 N.J.L. 397, 403 (E & A 1930); Dock Watch Hollow Quarry Pit, Inc. v. Warren Tp., 142 N.J.Super. 103, 121 (App.Div.1976), aff’d p. c. o. b., 74 N.J. 312 (1977); Lindsley v. Bd. of Managers, New Jersey State Prison, 107 N.J.L. 51, 55-56 (Sup.Ct.1930), aff’d p. c. o. b., 108 N.J.L. 415 (E & A 1932). A proper answer to the question of legislative authority must be based on the law existing at the time of defendant’s offense in 1978.
For the reasons elaborated in Dome Realty, see 83 N.J. at 228-231, we hold that at the time of the landlord’s violation, the Legislature had authorized the use of certificates of occupancy to enforce housing regulations. The general “municipal police power” statute, N.J.S.A. 40:48-2, permits regulation of local housing conditions “for the preservation of the public health, safety and welfare.” Id. Dome Realty, 83 N.J. at 229-231; see, e. g., Inganamort v. Borough of Fort Lee, 62 N.J. 521, 536 (1973); Fred v. Mayor of Old Tappan, 10 N.J. 515, 520-521 (1952). More specifically, the Legislature granted municipalities authority to “prevent and abate” defective housing by enacting N.J.S.A. 40:48-2.12a. See Dome Realty, 83 N.J. at 228-230.
The fact that Ordinance # 375 employs “certificates of occupancy” as its method of enforcement does not restrict Little Ferry to the authority provided for documents thus named in the State Uniform Construction Code Act. See N.J.S.A. 52:27D-133. It is true that this latter statute does not expressly authorize the issuance of certificates upon a mere change in *271occupancy of a residential dwelling.2 But this does not prevent the exercise of municipal authority granted under other enactments. “[The] duplication of terminology * * * does not serve to invalidate a legislative delegation by another, unrelated statute.” Dome Realty, 83 N.J. at 232. Without a clearly expressed intent in the State Uniform Construction Code Act to restrict the inspection authority of municipalities, “[w]e find no lack of authority for the * * * use of a document which simply memorializes the result of a housing inspection.” Id. at 232; see Summer v. Teaneck, 53 N.J. 548, 554 (1969). We therefore conclude that, like the ordinance of the City of Paterson in Dome Realty, the inspection scheme adopted by Little Ferry constitutes a valid exercise of delegated municipal authority.
The opinion of the Appellate Division suggests that a municipal zoning ordinance may not be used to enforce health regulations. See 169 N.J.Super. at 72. We find no support for this proposition. To be valid, “ordinances adopted under the zoning enabling act3 must bear a real and substantial relationship to the regulation of land within the municipality.4 They must also advance one of the several purposes specified in the *272enabling statute.” Taxpayers Ass’n of Weymouth Tp. v. Weymouth Tp., 80 N.J. 6, 21 (1976), app. dism. and cert. den. sub nom. Feldman v. Weymouth Tp., 430 U.S. 977, 97 S.Ct. 1672, 52 L.Ed.2d 373 (1977) (citations omitted and footnotes added). See, e. g., State v. Baker, 81 N.J. 99, 105-106 (1979); Kirsch Holding Co. v. Borough of Manasquan, 59 N.J. 241, 251 (1971); Morris v. Potsma, 41 N.J. 354, 359 (1964). Finally, the zoning provision must advance an authorized purpose in a manner permitted by the Legislature. See, e. g., Home Builders League of So. Jersey, Inc. v. Berlin Tp., 81 N.J. 127, 137-138 (1979); cf. Dome Realty, 83 N.J. at 226; Inganamort, 62 N.J. at 527. Little Ferry’s inspection ordinance satisfies each of these three requirements.
There is no dispute that an enactment which seeks to insure compliance with minimum standards of habitability in rented residential dwellings “relat[es] to the nature and extent of the uses of land and of buildings and structures thereon.”5 N.J.S.A. 40:55D-62a. Structures that do not conform to such minimum standards would be unfit for use as residential housing. A legitimate interest in maintaining an appropriate balance of land uses within a municipality would justify an inspection scheme to assure the continuing viability of residential property. Thus, the ordinance possesses “a real and substantial relationship to the regulation of land,” Taxpayers Ass’n of Weymouth, 80 N.J. at 21 and is not arbitrary or unreasonable.
The ordinance also furthers the first of the stated purposes of the Municipal Land Use Law:
[t]o encourage municipal action to guide the appropriate use or development of all lands in this State, in a manner which will promote the public health, safety, morals, and general welfare. [N.J.S.A. 40:55D-2a]
It is beyond question that maintaining minimum standards of habitability in rental housing will promote the “health, safety, morals, and general welfare.” The protection of apartment dwellers has long been recognized as consistent with the public health, safety and welfare. See, e. g., Hutton Park Gardens, supra; Inganamort, supra.
*273Defendant directs its challenge to the means by which the inspection ordinance strives to promote the general welfare. We find direct authorization for the enforcement of housing regulations in the zoning enabling law. It specifically permits as part of a zoning ordinance the “[e]stablish[ment], for particular uses or classes of uses, [of] reasonable standards of performance and standards for the provision of adequate physical improvements * * N.J.S.A. 40:55D-65d. “Standards of performance” are defined in part as standards “required by applicable Federal or State laws or municipal ordinances.” N.J. S.A. 40:55D-7.6 It therefore follows that a municipality may enforce its housing code as a part of its zoning scheme, provided the “standards of performance” are reasonable.7
Although health regulations governing rental housing may constitute an appropriate exercise of a municipality’s zoning authority, any such exercise may not transcend an express limitation of the enabling legislation. See, e. g., Home Builders League, 81 N.J. at 137-138; Dresner, 69 N.J. at 241. The most important statutory limitation is contained in section 55 of the Municipal Land Use Act, N.J.S.A. 40:55D-68. That section exempts from the requirements of a zoning ordinance “[a]ny nonconforming use or structure existing at the time of the passage of an ordinance * * The inspection ordinance does not run afoul of this restriction. It does not categor*274ically prohibit the residential use of affected property. Since the ordinance itself does not create new violations of the housing code but only serves to compel landlords to remedy them, any pre-existing violations would prevent a dwelling from being a formerly lawful, but presently “nonconforming use or structure.” See N.J.S.A. 40:55D-5.8 We therefore conclude that the ordinance does not establish or attempt to regulate nonconforming dwellings. It is thus within the bounds of the municipality’s delegated zoning power.9
Turning to the other objections to the ordinance raised by defendant, we find that our analysis in Dome Realty compels their resolution in favor of the municipality. The exemption from Little Ferry’s inspection scheme of one- and two-family homes is similar to an exception contained in the Paterson ordinance upheld in Dome Realty. The response to an attack under the Equal Protection Clause, U.S.Const, Amend. XIV, is therefore the same. Since there is nothing invidious about distinguishing one- and two-family dwellings from other structures, the ordinance is entitled to a presumption of validity. Its classifications are valid unless “they bear no rational relationship to a permissible state objective.” Parham v. Hughes, 441 U.S. 347, 99 S.Ct. 1742, 1745, 60 L.Ed.2d 269, 274 (1979); see, e. g., Vance v. Bradley, 440 U.S. 93, 99 S.Ct. 939, 59 L.Ed.2d 171 (1979); San Antonio School Dist. v. Rodriguez, 411 U.S. 1, 93 S.Ct. 1278, 36 L.Ed.2d 16 (1973); see also Taxpayers Ass'n of Weymouth Tp., 80 N.J. at 39-40; State v. Smith, 58 N.J. 202, 207 (1971). Greater efficiency in the operation of a valid inspec*275tion scheme, see supra at 270, is clearly a permissible governmental goal. To achieve this objective it would be rational to exclude from the enforcement procedures dwellings which are more likely to be in compliance with the applicable housing regulations without such added pressure. One- and two-family homes could reasonably be included in this class of dwellings. Because these dwellings are typically owner-occupied, their owners need less official coercion to insure proper maintenance. See Dome Realty, 83 N.J. at 243.
Even though there may be some exempt dwellings with absentee owners, that fact does not vitiate the rational basis of the exemption.
In the area of economics and social welfare, a State does not violate the Equal Protection Clause merely because the classifications made by its laws are imperfect. If the classification has some “reasonable basis,” it does not offend the Constitution simply because the classification “is not made with mathematical nicety or because in practice it results in some inequality.” Lindsley v. Natural Carbonic Gas Co., 220 U.S. 61, 78 [31 S.Ct. 337, 340] 55 L.Ed. 369 [1911], [Dandridge v. Williams, 397 U.S. 471, 485, 90 S.Ct. 1153, 1161, 25 L.Ed.2d 491 (1970)]
See Ohio Bur. of Employment Services v. Hodory, 431 U.S. 471, 489-491, 97 S.Ct. 1898, 1908-1910, 52 L.Ed.2d 513 (1977); Massachusetts Bd. of Retirement v. Murgia, 427 U.S. 307, 316, 96 S.Ct. 2562, 2568, 49 L.Ed.2d 520 (1976). A legislative body may justifiably recognize degrees of need for intervention, and accordingly may address itself only to that area most in need. State v. Senno, 79 N.J. 216, 227 (1979); State v. Smith, 58 N.J. 202, 207 (1971). We therefore find no constitutional defect in the ordinance’s exemption of a class of dwellings largely comprised of owner-occupied structures. The borough’s decision to conserve enforcement resources by exempting one- and two-family buildings from its certification scheme is far from irrational. Therefore, Little Ferry’s ordinance does not violate the Equal Protection Clause.
The third point of defendant’s attack is that State law has preempted local regulation of housing conditions. We have today rejected this argument in Dome Realty. See 83 N.J. at 232-234. Indeed, the statute upon which defendant bases its contention, the Hotel and Multiple Dwelling Law, N.J.S.A. *27655:13A-1 et seq., specifically permits stricter local enforcement of housing standards than that provided by State law. N.J.S.A. 55:13A-25(b); see Dome Realty, 83 N.J. at 232-233. We therefore find no evidence of a legislative purpose to preempt local initiative. See, e. g., id., at 232-233; Summer v. Teaneck, 53 N.J. 548, 554 (1969).
Although the parties did not raise the issue, the Appellate Division observed that by prohibiting occupancy before any findings of housing violations, the ordinance deprived landlords of their property without due process of law. See 169 N.J.Super. at 72. We discern no indication on the face of the ordinance that it operates to keep vacant apartments that are in full compliance with regulations. While the ordinance does require a landlord to notify the Building Inspector “within forty-eight hours of any vacancy,” there is no requirement that a landlord must wait for an apartment to become vacant before he may apply for a new certificate. In contrast, the ordinance requires a decision by the borough’s Building Inspector within forty-eight hours after receiving an application. A landlord can thus schedule an application sufficiently in advance of a new tenancy to prevent delays in re-renting and avoid any loss of income during the local administrative process. The ordinance specifically provides that a statement of reasons accompany a denial of a certificate. Supra at 267. The opportunity to appeal a denial is provided by the Municipal Land Use Law, which contains provisions governing appeals of actions taken “in-the enforcement of [a] zoning ordinance * * *." N.J.S.A. 40:55D-72a; see N.J.S.A. 40:55D-72 to -75. Nothing in the present record reveals that the ordinance deprives landlords of rental income without due process of law.
Each of the challenges which either defendant or the Appellate Division raises is lacking in substance. Accordingly, the judgment of the Appellate Division is reversed and defendant’s conviction reinstated.
Defendant does not challenge the validity of any of these administrative inspections. Cf. Marshall v. Barlow's, Inc., 436 U.S. 307, 98 S.Ct. 1816, 56 L.Ed.2d 305 (1978); Camara v. Municipal Court, 387 U.S. 523, 87 S.Ct. 1727, 18 L.Ed.2d 930 (1967); Dome Realty, Inc. v. City of Paterson, 83 N.J. at 239-241 (1980).
Section 15 of the State Uniform Construction Code Act, L. 1975, c. 217, § 15, N.J.S.A. 52:27D-133, provides for the issuance of certificates of occupancy by municipal construction officials for newly constructed buildings or structures altered wholly or in part. The statute does not specifically authorize requiring a new certificate upon the re-rental of a structure that does not involve a change in use. Cf. Dresner, 69 N.J. at 240-241. “The certificate of occupancy shall certify that the building or structure has been constructed in accordance with the provisions of the construction permit, the [State Uniform Construction Code], and other applicable laws and ordinances.” N.J.S.A. 52:27D-133. We express no opinion today regarding the proper scope of an inspection under the State Uniform Construction Act. See Dresner, 69 N.J. at 242.
Presently the Municipal Land Use Law, L. 1975, c. 291, N.J.S.A. 40:55D-1 et seq.
As expressed in the Municipal Land Use Law, a zoning ordinance must “relat[e] to the nature and extent of the uses of land and of buildings and structures thereon.” N.J.S.A. 40:55D-62a.
Defendant does not contend that the ordinance is without a real and substantial relationship to the use of land and its improvements.
Our Brother Schreiber’s narrow interpretation of “standards of performance,” post at 278 (Schreiber, J., dissenting), is inconsistent with the constitutional mandate that “any law concerning municipal corporations * * * shall be liberally construed in their favor.” N.J.Const. (1947), Art. IV, § 7, par. 11; see Divan Builders, Inc. v. Planning Bd. of Wayne Tp., 66 N.J. 582, 595 (1975); Inganamort, 62 N.J. at 534-536; Union Cty. Pk. Comm. v. Union Cty., 154 N.J.Super. 213, 227 (Law Div. 1976), aff'd p. c. o. b., 154 N.J.Super. 125 (App.Div. 1977), certif. den., 75 N.J. 531 (1977). The Legislature has explicitly adopted this principle of liberal construction for the Municipal Land Use Law. N.J.S.A. 40:55D-92. Such a construction permits a zoning ordinance to enforce “standards of performance” found in other existing ordinances.
Defendants do not challenge here the reasonableness of Little Ferry’s housing regulations.
By contrast, in Dresner the municipality sought to prohibit a genuine nonconforming use by withholding a certificate of occupancy respecting the structure. See 69 N.J. at 240. We rejected such an attempt. Id. at 241.
Our Brother Schreiber contends that the enactment of L. 1979, c. 476, N.J.S.A. 40:48-2.12m, confirms the absence of authority under the zoning power. Post at 280-281. But passage of the new statute does not indicate the absence of zoning authority any more than it indicates the prior absence of police power authority, see Dome Realty, 83 N.J. at 228-229. The dissent’s assertion requires too fine a distinction to be drawn from what little legislative history the statute possesses.