
151 So.2d 240 (1963)
Clyde Edward HILLIS
v.
CITY OF HUNTSVILLE.
8 Div. 118.
Supreme Court of Alabama.
March 14, 1963.
*241 Humphrey & Lutz, Huntsville, for appellant.
Jack Giles and Chas. H. Younger, Huntsville, for appellee.
SIMPSON, Justice.
Appeal by the plaintiff from a judgment of nonsuit superinduced by the ruling of the trial court sustaining demurrers to the complaint. The complaint, claiming damages for personal injuries, is framed in two counts under § 326(1) and (2), Title 26, Code of Ala. 1940, the Employers' Liability Act.
Count I alleges, in substance, that the plaintiff was employed to work on the streets of the city, and while acting in such service, plaintiff was operating a tractor supplied and being used in the city's business in cutting weeds "in a ditch along a certain public street", when the tractor overturned pinning plaintiff thereunder, causing him severe injuries. The damages are alleged to have been proximately caused by defective brakes on the tractor. A further averment is added, that plaintiff presented a written claim for damages to the city and has had no response thereto.
Count II, framed under § 326(2), supra, is identical with Count I except it alleges that the injuries were caused by reason of the negligence of defendant's agents and employees entrusted with the superintendence of the work, in allowing defective brakes to exist on the tractor.
Two questions are presented by this appeal, viz., does the Employers' Liability Act apply to a municipality? If so, then the further question: Whether the cutting of weeds "in a ditch along a certain public street" is a governmental function, or is the City exercising a purely corporate function in the transaction of such business? Applicability of Employers' Liability Act to a Municipality
Appellee first argues that the Employers' Liability Act does not apply to a municipality and that the cases relied upon by appellant holding that the act does apply were decided before the passage of Act No. 797, General Acts of Ala., 1907, presently §§ 502-504, Title 37, Code of Ala. 1940.

Section 502 provides, inter alia:
"No city or town shall be liable for damages for injury done to or wrong suffered by any person or corporation, unless said injury or wrong was done or suffered through the neglect, carelessness, or unskillfulness of some agent, officer, or employe of the municipality engaged in work therefor; and while acting in the line of his duty, or unless the said injury or wrong was *242 done or suffered through the neglect, carelessness, or failure to remedy some defect in the streets, alleys, * * *."
It is clear, and has been so decided, that Act No. 797 was intended by the legislature to restrict municipal liability to two classes: (1) Where the wrong done was the proximate result of culpable act or omission of some agent, officer, or employee then engaged within the line of his duty in the municipality's service; or (2) where the wrong was the proximate result of some culpable omission by the municipality to remedy some defect in the streets, alleys or buildings, after the same has been called to the attention of the council. City of Bessemer v. Chambers, 242 Ala. 666, 8 So.2d 163.
In City Council of Sheffield v. Harris (1893), 101 Ala. 564, 14 So. 357, where an employee of the city was engaged in digging gravel and struck an unexploded dynamite cap and was severely injured, the court held that a good cause of action was set forth under (2) of the Employers' Liability Act. The court in effect held that the act was applicable to a municipality. Appellee brings to our attention that this case was decided before the passage of Act No. 797, and this decision should be considered as overruled by Act No. 797. In Lewis v. City Council of Montgomery (S.Ct. of Ala., 1894), 16 So. 34, where a demurrer to the complaint was sustained by the trial court, the court held that the city employee had alleged a good cause of action under the Employers' Liability Act and reversed the lower court. This case was also decided before the passage of Act No. 797. Then in the case of Long v. City of Birmingham, 161 Ala. 427, 49 So. 881, decided by this court two years after passage of Act No. 797, the injuries occurring to the employee before passage of the act, the court in deciding the case did not even discuss Act No. 797, but made the following statement:
"It may be conceded that the employer's liability act applies to municipal corporations, except where such corporations are engaged in the discharge of governmental duties; that is to say, in the exercise of powers conferred for the general public good, as distinguished from those conferred for the private advantage of the corporation."
Then in Hillman v. City of Anniston, 214 Ala. 522, 108 So. 539, 46 A.L.R. 89, where the cause of action arose after the passage of Act No. 797, the court said:
"Following up this doctrine that the officers and agents engaged in street work represent the municipality in its corporate or business character, it was held in City Council [of Sheffield] v. Harris, 101 Ala. 564, 14 So. 357, that the city is liable under the Employers' Liability Act for the death of an employee while working in a pit preparing gravel for use upon the streets, and occurring under circumstances covered by the act.

* * * * * *
"It is generally held as in Alabama that in the prosecution of corporate rather than strictly governmental undertakings the doctrine of respondeat superior does apply in favor of third persons or employees injured or killed as the proximate result of the wrongful act of such agent acting in the line of his employment."
Thus, while not making a definite statement that the Employers' Liability Act was applicable to a municipality, it is obvious from a close reading of the Hillman case that the theories underlying the act were embraced and utilized by the court in reversing the lower court.
From a careful reading of these cases, based upon sound theory and logic, and careful scrutiny of the pertinent Code sections, we do not think the Employers' Liability Act was rendered inapplicable as a whole to municipalities by said Act No. 797. We are, however, of the opinion that unless a complaint is framed under one of the two theories contemplated by § 502, *243 it would fail to state a cause of action. But the Employers' Liability Act is inapplicable to a municipality where in conflict with § 502, supra, giving literal effect thereto.
Count I, framed under § 326(1), supra, would not be within the purview of § 502, and as such would be demurrable for failing to state a cause of action. The demurrer filed by appellee on this ground would be therefore well taken, and the ruling of the trial court in this respect would be free from error.
Count II, however, framed under § 326(2), alleging that the injury was caused by reason of the negligence of the City's agents and employees intrusted with the superintendence of the work in allowing defective brakes to exist on the tractor, would not be in conflict with § 502, as it would be within the purview of the first class of municipal liability contemplated by the statute, i. e., "* * * said injury or wrong was done or suffered through the neglect, carelessness, or unskillfulness of some agent, officer, or employee of the municipality engaged in work therefor; * * *".
Having determined that the Employers' Liability Act was applicable to municipalities where not in conflict with § 502, supra, we move to the second question presented on this appeal.

Governmental Immunity
Concededly, a municipality being a political subdivision of the state, cannot be held to answer for torts of its agents while carrying out governmental or public functions. Densmore v. City of Birmingham, 223 Ala. 210, 135 So. 320; McSheridan v. City of Talladega, 243 Ala. 162, 8 So.2d 831; City of Bay Minette v. Quinley, 263 Ala. 188, 82 So.2d 192; City of Decatur v. Parham, 268 Ala. 585, 109 So.2d 692; Smith v. City of Birmingham, 270 Ala. 681, 121 So.2d 867; but a municipality is liable for torts committed by its agents in carrving out or performing its corporate or ministerial duties. Ibid.
The determining test as to whether a function is governmental or corporate may be simply stated, viz., "Whether the act performed is for the common good of all, or for the special benefit or profit of the corporate entity." McSheridan v. City of Talladega, supra; Parr v. City of Birmingham, 264 Ala. 224, 85 So.2d 888.
In City of Bay Minette v. Quinley, supra (quoting from the New York case of Maxmilian v. Mayor, 62 N.Y. 160) a detailed statement and rationale of the test are found:
"`One is of that kind which arises from the grant of a special power, in the exercise of which the municipality is as a legal individual; the other is of that kind which arises, or is implied, from the use of political rights under the general law, in the exercise of which it is as a sovereign. The former power is private, and is used for private purposes; the latter is public and is used for public purposes. * * The former is not held by the municipality as one of the political divisions of the State; the latter is. In the exercise of the former power, and under the duty to the public which the acceptance and use of the power involves, a municipality is like a private corporation, and is liable for a failure to use its power well, or for an injury caused by using it badly. But where the power is intrusted to it as one of the political divisions of the State, and is conferred not for the immediate benefit of the municipality, but as a means to the exercise of the sovereign power for the benefit of all citizens, the corporation is not liable for nonuser, nor for misuser by the public agents. * * *'"
A statement of the law is a simple task but its application to the facts of a particular case has led to seemingly incongruous and diverse results. A logical approach to the problem is not possible, nor do we think *244 feasible. For example, a city operating golf links in a public park is held to be performing a governmental function (Williams v. City of Birmingham, 219 Ala. 19, 121 So. 14); and so with a swimming pool and recreational facilities (City of Decatur v. Parham, supra); but the construction, repair of streets and sewers is consistently held to be a corporate function. Hillman v. City of Anniston, supra; Nelson v. Johnson, 264 Ala. 422, 88 So.2d 358; Brown v. City of Fairhope, 265 Ala. 596, 93 So.2d 419; Morgan v. City of Tuscaloosa, 268 Ala. 493, 108 So.2d 342. (See the enlightening discussion in 13 Ala.Law Rev. 296, at p. 318.)
The cases in other jurisdictions have produced similar diverse results. See the collection of cases in 120 A.L.R. 1376; 60 A.L. R.2d 1198.
Thus, it would seem that each case must be decided upon its own facts or allegations, no analogy being possible.
We are of the opinion that cutting weeds "in a ditch along a certain public street" is a governmental or public function, although we could imagine situations where the cutting of weeds would be a corporate function, and accordingly governmental immunity would not attach. Taking judicial knowledge that an abundance of weeds within a municipality could be injurious to the general public health of the citizens, the removal and clearance thereof must be had for the good of the public. Moreover, the legislature has authorized cities to "* * * require weeds to be cut or other things or conditions favorable to the harboring of such insects to be abated, or to do such work * * *", § 501, Title 37, Code of Ala. 1940. The apparent judicial weight of authority is in accord. See 34 A.L.R.2d 1210.
Under the allegations of the complaint in the case at bar, it would be impossible to class this situation with those cases holding the maintenance and repair of streets is a corporate function. Indeed, it would be extremely difficult to see how the eradication of weeds would be of "special benefit or profit" to a municipality.
It results as our view that the trial court was correct in sustaining the demurrer to the complaint.
Affirmed.
LIVINGSTON, C. J., and MERRILL and HARWOOD, JJ., concur.
