This controversy stems from a disastrous fire which occurred on January 24, 1974 in the Village of Liberty. *509Plaintiffs were residents of a multiple dwelling and receiving welfare benefits from the defendant County of Sullivan. As a result of the fire, the wife of each plaintiff and three children of one plaintiff met death. These actions for wrongful death were instituted against appellants and others, not concerned with this appeal.
The complaint, among other things, alleges in substance that defendant Village of Liberty hired defendant Como as its Building Inspector, knowing him to be incompetent and that his incompetence resulted in the deaths complained of; that in violation of statutes and ordinances enacted for the special benefit and protection of those in plaintiffs’ class, the building was not provided with adequate means of ingress and egress and was not equipped with fire escapes; that defendants Village of Liberty and Como had knowledge of the violations and failed to remedy them; that said building constituted a nuisance and firetrap; and that defendant County of Sullivan and its agent, defendant Department of Social Services, arranged for plaintiffs to reside in the building, knowing it to be a nuisance and hazard.
Appellants, Village of Liberty, Como, County of Sullivan and the Department of Social Services, moved to dismiss the complaint on the ground that it failed to state a cause of action. Special Term denied the motion and granted plaintiffs’ motion to amend the amended complaint, adding Liberty Video Corporation as a party defendant and alleging additional acts of negligence on the part of defendant Village of Liberty in that it maintained wires on electric poles which interfered with rescue operations. This appeal ensued.
As to the motion granting plaintiffs leave to amend the amended complaint, the record demonstrates that a timely notice of claim was filed which alleged negligence in that the village failed "to assure that fire escapes and windows were available for escape in time of emergency.” On the same day a claim was filed on behalf of another individual in a companion case in which it was stated that the village owned or leased wires overhanging and adjacent to the factory. This notice of claim also contained the pertinent allegations set forth in plaintiffs’ notice of claim. Since the purpose of a notice of claim is to afford the municipality timely notice in order to permit it to properly investigate the claim, we are of the opinion that, under all the circumstances, appellants had substantial knowledge of the relevant facts and circumstances *510and are not prejudiced by the amendment. Special Term, therefore, properly granted the motion.
We now pass to that phase of appellants’ argument wherein reversal is urged on the ground that there can be no liability on the part of a municipality for failure to supply general police or fire protection. In support of their position, appellants rely heavily on Motyka v City of Amsterdam (15 NY2d 134).
Initially, we point out that we are here concerned with the dismissal of a complaint for failure to state a cause of action. It is well settled that on such a motion ail of the allegations of the complaint, together with all reasonable inferences, must be viewed in a light most favorable to plaintiffs. (Schuster v City of New York, 5 NY2d 75, 87.) We are not concerned with whether plaintiffs can prove a cause of action, but whether they have alleged one.
From an examination of the complaint in the instant case and the facts and circumstances of Motyka, we are of the view that the two cases are distinguishable. Unlike Motyka, the complaint herein alleges that the statutes and ordinances violated were enacted for the special benefit and protection of those in plaintiffs’ class. Furthermore, it is also alleged that the Village of Liberty’s known incompetent agent, defendant Como, had knowledge of the conditions which constituted a nuisance and firetrap and failed to take steps to remedy them. Applying the general rules which inure to the plaintiffs’ benefit on a motion to dismiss a complaint, we conclude that Special Term properly denied the motion insofar as appellants village and Como are concerned.
As to the action against the County of Sullivan, the county argues that it had no obligation to inspect the premises merely because these plaintiffs were receiving welfare benefits distributed by it. The complaint alleges that the county arranged for plaintiffs to reside at the premises in spite of the fact that it had knowledge of the conditions therein, which constituted a nuisance. There is, however, no allegation of a statutory duty on the part of the county to have withheld rents from the landlord unless such conditions were remedied. Nor is any statutory liability on the part of the county alleged. In our view, no common-law liability exists. As to the County of Sullivan, the complaint fails to state a cause of action and must be dismissed. It follows, therefore, that there *511can be no action against its agent, the Department of Social Services.
The order denying the motion to dismiss the complaint should be modified, on the law and the facts, so as to grant the motion in favor of defendants County of Sullivan and Department of Social Services of the County of Sullivan, and, as so modified, affirmed; the order granting the motion to amend the amended complaint should be affirmed, without costs.