
88 Wn.2d 624 (1977)
564 P.2d 1145
RANDY STANDOW, Respondent,
v.
THE CITY OF SPOKANE, ET AL, Appellants.
No. 44599.
The Supreme Court of Washington, En Banc.
June 2, 1977.
*627 Richard F. Wrenn, Corporation Counsel, and Frederick J. Dullanty, Jr., Assistant, for appellants.
Bennion & Van Camp, by W. Russell Van Camp, for respondent.
UTTER, J.
The City of Spokane appeals from an order of the Superior Court issued upon a writ of certiorari filed by the respondent, Randy Standow, directing appellant to issue to respondent a license to operate taxicabs within the city. We reverse.
Respondent made application, pursuant to an ordinance of the City of Spokane, for a license to operate a motor vehicle for hire. The Spokane Police Department Licensing Division refused to grant the license, and respondent sought review of that decision by the city council. The council affirmed the decision of the licensing division and respondent then sought relief in Superior Court through an action for damages and request for a writ of mandamus directing the City to issue him a license. The writ of mandamus was denied, but the Superior Court directed the city council to rehear the matter and enter specific findings justifying its action. In compliance with this directive, the City held another hearing, reaffirmed its decision to deny the license, and entered written findings with regard to the matter. The respondent then sought relief by writ of certiorari in Superior Court. This writ was granted and, following a hearing, the trial court rendered a decision directing the City to issue the respondent a license, concluding the city ordinance which provided the basis for appellant's decision was void for vagueness and that the findings of the city council did not justify its action. The City appealed and the Court of Appeals certified the issues presented to this court for resolution.
The applicable ordinance requires the licensing of any person operating a vehicle for hire within the city. It precludes issuance of a license to an applicant who has been "previously convicted of the violation of any ordinance of *628 the City of Spokane, or any law of the state of Washington or of the United States, reasonably related to his fitness or ability to operate a vehicle for hire." Spokane ordinance No. C19415, § 3(f) (December 11, 1967). Respondent purchased several vehicles which were licensed to operate as taxicabs within the city. In June of 1975 he applied for the license here at issue in order to be able to function as an owner/operator of his vehicles. It appears from the record that the respondent had been convicted of two felonies and at least three moving traffic violations within 18 months of the date of his application. The actions giving rise to the traffic convictions were: speeding, January 11, 1974; improper turn, June 6, 1974; and negligent driving accident, July 25, 1974. The felony convictions arose from an incident which occurred January 21, 1974, involving larceny of snowmobiles and an incident which occurred August 3, 1974, involving burglary of a gas station. At the time of the proceedings below, the respondent was incarcerated in the Spokane County/City Jail and enrolled in a work release program. The city council did not initially give any specific reasons for denying respondent the license which he requested; however, in response to the directive of the Superior Court following the mandamus proceeding, the city council reheard the respondent's appeal and made certain findings.[1]
*629 Respondent then sought a writ of certiorari in the Superior Court which was granted. The court determined the provision of the city ordinance which allows denial of a license on the basis of convictions reasonably related to fitness to drive a vehicle for hire was unconstitutional and void for vagueness. It further held respondent's felony and traffic convictions did not relate to his ability to drive a motor vehicle for hire and directed the City to issue the requested license to the respondent.

I
The propriety of the issuance of a writ of certiorari is raised by appellant. RCW 7.16.040[2] expressly limits the power of the Superior Court to issue writs of certiorari to actions of an inferior tribunal, board or officer, "exercising judicial functions". Some cases have held nonjudicial acts may not be reviewed by means of the writ. State ex rel. Hood v. State Personnel Bd., 82 Wn.2d 396, 511 P.2d 52 (1973); Okanogan County School Dist. 400 v. Andrews, 58 Wn.2d 371, 363 P.2d 129 (1961).
[1] The efforts of the courts to distinguish "judicial" action from that which is "legislative" or "administrative" arise from the constitutional principle of separation of powers and concern for an improper encroachment upon the exclusive constitutional territory of another branch of government. Unfortunately, the lines demarking the respective territories of the three branches of government cannot be set down with a surveyor's precision. In re Juvenile Director, 87 Wn.2d 232, 552 P.2d 163 (1976). Many of *630 the functions performed by legislative or executive bodies closely resemble the work of courts. In discharging our constitutional duty to give effect to the notion of separation of powers, this court is often required to categorize a particular form of proceeding for a particular purpose in a manner which may subsequently appear artificial or inappropriate if applied to similar proceedings in a different context. In making such classifications, the role of the courts is not to attach arbitrary labels of convenience to the actions of other branches of government, but rather to establish, in a given factual setting, the appropriate scope of judicial review. See Citizens Against Mandatory Bussing v. Palmason, 80 Wn.2d 445, 495 P.2d 657, 50 A.L.R.3d 1076 (1972); Household Fin. Corp. v. State, 40 Wn.2d 451, 244 P.2d 260 (1952); 47 Wash. L. Rev. 707 (1972).
[2] The limitation contained in RCW 7.16.040 must be approached with these principles in mind. Allowing review of licensing decisions by writ of certiorari is consistent with the general purpose of the writ, which is "to review the official acts of a public officer, or an organ of government." Pierce v. King County, 62 Wn.2d 324, 331, 382 P.2d 628 (1963). In Pierce, a writ of certiorari was held to be an appropriate means by which to review the validity of municipal zoning ordinances, an activity which has many characteristics of legislative action. We have also broadly construed the judicial function limitation set forth in the statute in other types of cases. See State ex rel. Cosmopolis Consol. School Dist. 99 v. Bruno, 59 Wn.2d 366, 367 P.2d 995 (1962); 38 Wash. L. Rev. 249 (1963).
[3] This court has on several occasions stated that licensing is not a judicial function. Citizens Council Against Crime v. Bjork, 84 Wn.2d 891, 529 P.2d 1072 (1975); Household Fin. Corp. v. State, supra; State ex rel. Aberdeen v. Superior Court, 44 Wash. 526, 87 P. 818 (1906). Such proceedings, however, possess aspects of a judicial nature. Tarver v. City Comm'n, 72 Wn.2d 726, 435 P.2d 531 (1967); Brown v. Seattle, 150 Wash. 203, 272 P. 517 (1928); Sumner v. Ward, 126 Wash. 75, 217 P. 502 *631 (1923). Application of the criteria enunciated by this court for determining whether the action of a municipal corporation is "judicial" or "nonjudicial" in nature suggests that a licensing proceeding has aspects of both. In making this determination, the courts should consider: (1) whether the court could have been charged with the duty at issue in the first instance; (2) whether the courts have historically performed such duties; (3) whether the action of the municipal corporation involves application of existing law to past or present facts for the purpose of declaring or enforcing liability rather than a response to changing conditions through the enactment of a new general law of prospective application; and (4) whether the action more clearly resembles the ordinary business of courts, as opposed to those of legislators or administrators. Francisco v. Board of Directors, 85 Wn.2d 575, 537 P.2d 789 (1975). Licensing is a hybrid activity not susceptible of rigorous classification under these tests.
[4] The right to pursue one's chosen occupation may be subject to municipal regulation. Where, as here, pursuit of that occupation involves actions potentially dangerous to the public welfare, the private use of public property, may, in appropriate circumstances, be wholly denied. Tarver v. City Comm'n, supra. The courts possess inherent power, whatever the proceedings may be labeled, to protect individual citizens from arbitrary action, including the denial of a license to pursue such an occupation. Seattle v. Bittner, 81 Wn.2d 747, 505 P.2d 126 (1973); Creelman v. Board of Registration, 73 Wn.2d 298, 438 P.2d 215 (1968); State ex rel. Makris v. Superior Court, 113 Wash. 296, 193 P. 845, 12 A.L.R. 1428 (1920). The scope of review afforded by a writ of certiorari does not, in this factual context, exceed this inherent power of review. See RCW 7.16.120.[3]
*632 [5] The statute limits the scope of review to determining essentially whether the ordinance itself is valid and whether the action taken pursuant to it was arbitrary and capricious or contrary to law, a standard of review which is consistent with our inherent powers of review. Since the review available upon writ of certiorari is essentially the same in this factual setting as it would be under our inherent powers of review, and in view of the fact that municipal licensing does possess significant judicial characteristics, we hold that municipal licensing is a "judicial function" as that term is utilized in RCW 7.16.040 and that review of such a proceeding by writ of certiorari is proper.
[6] Appellant next contends relief by certiorari was improper because the respondent, by filing an action for damages, clearly demonstrated that he possessed an adequate remedy at law. Filing an action for damages does not preclude the subsequent issuance of a writ of certiorari in the same cause, upon a proper showing, where relief in the way of damages is inadequate as it is here. The record supports the argument that failure to obtain a license to drive could have jeopardized the financing of respondent's vehicles, and the decision of the trial court to allow issuance of the writ was not defective on this basis and was within its *633 discretion. See State ex rel. PUD 1 v. Schwab, 40 Wn.2d 814, 246 P.2d 1081 (1952).

II
[7] Appellant's claim that respondent's failure to serve and make the Attorney General a party to this action renders his effort to challenge the constitutionality of the ordinance invalid, is without merit. The statute relied upon applies only to proceedings brought under the declaratory judgment statute. RCW 7.24.110.[4]Watson v. Washington Preferred Life Ins. Co., 81 Wn.2d 403, 502 P.2d 1016 (1972).

III
[8-10] Appellant defends the constitutionality of the challenged ordinance and notes the scope of the power of the state and its political subdivisions to regulate or control the occupational activities of its citizens depends upon the nature of the specific activity in question. If a citizen chooses to pursue a vocation on private property by private means, that vocation is subject to cautious regulation, but the right to pursue it may not be denied or unduly abridged by governmental authority under the guise of regulation. Tarver v. City Comm'n, supra; State ex rel. Makris v. Superior Court, supra. Where such activity is intertwined with the exercise of First Amendment freedoms, the power to regulate is very limited. Seattle v. Bittner, supra. The power of a municipality to regulate business activities potentially dangerous to the public health or safety, or which involve an extraordinary use of public property, is, however, considerably broader. Tarver v. City Comm'n, supra. A license to perform a business activity within these *634 latter two categories may be denied so long as the basis for the denial has a reasonable relation to the licensed occupation. Seattle v. Bittner, supra; In re Flynn, 52 Wn.2d 589, 328 P.2d 150 (1958). See Schware v. Board of Bar Examiners, 353 U.S. 232, 1 L.Ed.2d 796, 77 S.Ct. 752 (1957); Yick Wo v. Hopkins, 118 U.S. 356, 30 L.Ed. 220, 6 S.Ct. 1064 (1886). In Tarver, this court concluded the licensing of taxicab drivers involved both considerations of public safety and the private use of public property, and held a municipality has the power to require all taxicab drivers to be of good moral character. The court there further suggested violation of the law would be sufficient basis for denial of a license if the violation was reasonably related to the licensed occupation and that the possibility of arbitrary application of the broad standards permissible in this area was adequately protected by the availability of judicial review.[5]
The ordinance here at issue allows the City to deny a license on the basis of conviction of violation of laws reasonably related to the applicant's ability to drive a motor vehicle for hire. In view of the foregoing authority, we hold such an ordinance to be within the scope of the general powers of municipalities and not unconstitutionally vague.
[11] The constitutional power of a municipality to enact such an ordinance may, however, be abridged by the state legislature. A city may not enact nor enforce ordinances which directly conflict with the general laws passed by the legislature. Const. art. 11, § 10 (amendment 40) and § 11. See State Bd. Against Discrimination v. Board of Directors, 68 Wn.2d 262, 412 P.2d 769 (1966); Brown v. Seattle, 150 Wash. 203, 272 P. 517 (1928); Trautman, Legislative Control of Municipal Corporations in Washington, 38 Wash. L. Rev. 743 (1963). RCW 9.96A, which by its terms *635 applies to all political subdivisions of the state, declares it to be the policy of this state to
encourage and contribute to the rehabilitation of felons and to assist them in the assumption of the responsibilities of citizenship, and the opportunity to secure employment or to pursue, practice or engage in a meaningful and profitable trade, occupation, vocation, profession or business is an essential ingredient to rehabilitation and the assumption of the responsibilities of citizenship.
RCW 9.96A.010. Consistent with this declaration of policy, RCW 9.96A.020[6] precludes the denial of a license to pursue an occupation on the basis of felony convictions not directly related to the occupation in question. In view of this provision, the appellant was without power to deny a license on the basis of felony convictions only reasonably related to the ability to operate a taxicab. The fact that the ordinance in question allows the City to take action in excess of its powers does not, however, in itself, entitle the respondent to relief. He has the burden to demonstrate he was harmfully affected by the particular provision of the ordinance which purported to give the City authority to act in an unlawful manner. Tarver v. City Comm'n, supra; Seattle v. Long, 61 Wn.2d 737, 740, 380 P.2d 472 (1963). Cf. Seattle v. Pullman, 82 Wn.2d 794, 514 P.2d 1059 (1973). The city council, apparently aware of this provision of *636 RCW 9.96A, declared in its findings that the respondent's criminal record was both directly and reasonably related to his ability to drive taxicabs. Denial of the license on the basis that respondent's felony convictions were directly related to his ability to pursue this occupation, would be permissible.
[12] RCW 9.96A also contains a provision which states:
Any complaints or grievances concerning the violation of this chapter shall be processed and adjudicated in accordance with the procedures set forth in chapter 34.04 RCW, the administrative procedure act.
RCW 9.96A.040. Under the administrative procedures act, licensing action is treated as a "contested case" subject to all procedures applicable to quasi-judicial action by state administrative agencies. RCW 34.04.010(3); RCW 34.04.090-.140. While the administrative procedures act does not ordinarily apply to municipal corporations making decisions of a local nature (Riggins v. Housing Authority, 87 Wn.2d 97, 549 P.2d 480 (1976)), this provision indicates the legislature intended the applicable scope of review of a denial of a license based upon felony convictions to be that set forth in RCW 34.04.130(6)(a-f). That provision allows judicial review, not only on the basis of the arbitrary and capricious standard, but also the broader "clearly erroneous" test, under which a reviewing court may review the entire record and consider the policy of applicable legislation in an effort to determine if the decision at issue was clearly incorrect. Swift v. Island County, 87 Wn.2d 348, 357, 552 P.2d 175 (1976); Norway Hill Preservation & Protection Ass'n v. King County Council, supra.[7]
Based upon the foregoing discussion, the following principles apply to our review of the decision below. The City of *637 Spokane has the power to enact an ordinance requiring the licensing of taxicab drivers and the provision of the ordinance enacted allowing denial of such a license on the basis of convictions of violation of the law reasonably related to ability to perform this occupation, is not unconstitutionally vague. Insofar, however, as the City bases its action upon prior conviction of felonies, RCW 9.96A requires a showing of direct relation between such convictions and the licensed occupation. The City purported to apply its ordinance in this limited fashion, finding the respondent's convictions to be both directly and reasonably related to the licensed occupation. By so limiting its action, the council did not act in excess of its powers. In evaluating the council's decision, the trial court was limited, insofar as the traffic violations are concerned, to determining whether the action of the city council was arbitrary and capricious. However, to the extent the council's action involves denial of a license based upon prior conviction of felonies, the broader clearly erroneous test is to be applied.
We believe the trial court erred in overturning the decision of the council on the basis of either standard. While the trial judge may well have chosen to grant this license had he been empowered to hear the matter in the first instance, he was only entitled on review to consider whether the appellant's conclusions with regard to the traffic convictions were arbitrary and capricious and whether those concerning the felony convictions were clearly erroneous.
[13] This court, upon appeal from a superior court's application of either standard, applies that standard directly to the record of the administrative proceedings. Department of Ecology v. Ballard Elks Lodge 827, 84 Wn.2d 551, 527 P.2d 1121 (1974). We find the conclusions of the city council concerning respondent's traffic convictions to be amply supported by the record and thus not arbitrary and capricious. An applicant's driving record during the 18 months prior to requesting a taxicab driver's license is reasonably related to his ability to adequately *638 protect the well-being of his passengers. At one of the hearings before the city council in this case, a deputy chief of police indicated that a traffic record such as the respondent's would have rendered him unacceptable without regard to his felony record. Respondent's effort to limit consideration of his driving record on the basis that he was driving a private vehicle rather than a taxi at the time those violations occurred, is inappropriate. If such a limitation were imposed, it would be impossible for the City to deny a license to a first-time applicant no matter how horrendous his driving record might be. We further believe the City's conclusions with regard to the respondent's felony convictions were not clearly erroneous. In so concluding, we note, as did the city council, that the nature of this occupation places the general public in a particularly vulnerable position should a licensee fail to discharge his occupation with a sense of justice and honesty. We cannot say that the City was clearly wrong in determining it did not wish to subject the public to the possible risks involved in granting a license to drive vehicles for hire to one who had been convicted of felonies of this nature and of such recent origin. If this case involved a different occupation or if a greater period of time had elapsed since these crimes had been committed, our decision might well be different.

IV
[14] Respondent has argued in support of the judgment below that the conduct of the city council in these proceedings violated the doctrine of "appearance of fairness" applicable to certain quasi-judicial actions of administrative bodies. Even if that doctrine is applied to the facts of this case, our examination of the record does not reveal it was violated. No individual involved in quasi-judicial decision making activity either gained or lost or appeared to gain or lose by virtue of his decision in violation of the doctrine. See, e.g., Byers v. Board of County Comm'rs, 84 Wn.2d 796, 529 P.2d 823 (1974); Buell v. Bremerton, 80 Wn.2d 518, 495 P.2d 1358 (1972).
*639 The order of the trial court is reversed and the decision of the city council, denying the requested license, is reinstated.
WRIGHT, C.J., and ROSELLINI, HAMILTON, STAFFORD, BRACHTENBACH, HOROWITZ, and DOLLIVER, JJ., concur.
HICKS, J., concurs in the result.
NOTES
[1]  On December 22, 1975, the city council reheard the appeal and made the following findings:

"1. That Mr. Standow has been convicted or forfeited bond on three moving traffic violations since January, 1974.
"2. That in April, 1975, Mr. Standow was convicted of two grand larceny felony charges arising from two separate incidences, and that these charges involved actual theft.
"3. That such moving traffic violations are not reflective of the skill, care and judgment necessary to operate vehicles for hire with due regard for the safety of passengers and the public at large.
"4. That the felony convictions for grand larceny are crimes of moral turpitude; that opportunities for mishandling funds, property, and knowledge of the personal affairs of passengers occur frequently and the potential for abuses great; that the occupation of driving vehicles for hire requires absolute trust and honesty in dealing with money and property of the public; the nature of these recent felony convictions do not indicate the presence of these necessary qualities;
"5. That the moving traffic violations and felony convictions are directly and reasonably related to Mr. Standow's fitness and ability to be licensed to operate a vehicle for hire in the City of Spokane, and that his petition for issuance of a license to do so is denied."
[2]  "A writ of review shall be granted by any court, except a police or justice court, when an inferior tribunal, board or officer, exercising judicial functions, has exceeded the jurisdiction of such tribunal, board or officer, or one acting illegally, or to correct any erroneous or void proceeding, or a proceeding not according to the course of the common law, and there is no appeal, nor in the judgment of the court, any plain, speedy and adequate remedy at law." RCW 7.16.040.
[3]  RCW 7.16.120 reads as follows:

The questions involving the merits to be determined by the court upon the hearing are:
(1) Whether the body or officer had jurisdiction of the subject matter of the determination under review.
(2) Whether the authority, conferred upon the body or officer in relation to that subject matter, has been pursued in the mode required by law, in order to authorize it or to make the determination.
(3) Whether, in making the determination, any rule of law affecting the rights of the parties thereto has been violated to the prejudice of the relator.
(4) Whether there was any competent proof of all the facts necessary to be proved, in order to authorize the making of the determination.
(5) If there was such proof, whether there was, upon all the evidence, such a preponderance of proof, against the existence thereof, rendered in an action in a court, triable by a jury, as would be set aside by the court, as against the weight of evidence.
The parties in their briefs apparently assumed that RCW 7.16.120(5) contemplates broader review than that available under the arbitrary and capricious standard. However, this court has defined arbitrary and capricious review as a search for substantial evidence, Norway Hill Preservation & Protection Ass'n v. King County Council, 87 Wn.2d 267, 552 P.2d 674 (1976), the same standard applicable under RCW 7.16.120(5). Trudeau v. Haubrick, 65 Wn.2d 286, 396 P.2d 805 (1964); In re Black, 47 Wn.2d 42, 287 P.2d 96 (1955).
[4]  "When declaratory relief is sought, all persons shall be made parties who have or claim any interest which would be affected by the declaration, and no declaration shall prejudice the rights of persons not parties to the proceeding. In any proceeding which involves the validity of a municipal ordinance or franchise, such municipality shall be made a party, and shall be entitled to be heard, and if the statute, ordinance or franchise is alleged to be unconstitutional, the attorney general shall also be served with a copy of the proceeding and be entitled to be heard." RCW 7.24.110.
[5]  It should be made clear that we do not suggest broad standards such as these would be applicable in the area of penal statutes, where more precise standards are required. See, e.g., State v. Martinez, 85 Wn.2d 671, 538 P.2d 521 (1975).
[6]  "Notwithstanding any other provisions of law to the contrary, a person shall not be disqualified from employment by the state of Washington or any of its agencies or political subdivisions, nor shall a person be disqualified to practice, pursue or engage in any occupation, trade, vocation, or business for which a license, permit, certificate or registration is required to be issued by the state of Washington or any of its agencies or political subdivisions solely because of a prior conviction of a felony: Provided, This section shall not preclude the fact of any prior conviction of a crime from being considered. However, a person may be denied employment by the state of Washington or any of its agencies or political subdivisions, or a person may be denied a license, permit, certificate or registration to pursue, practice or engage in an occupation, trade, vocation, or business by reason of the prior conviction of a felony if the felony for which he was convicted directly relates to the position of employment sought or to the specific occupation, trade, vocation, or business for which the license, permit, certificate or registration is sought, and the time elapsed since the conviction is less than ten years." RCW 9.96A.020.
[7]  The failure of the respondent to seek review in accordance with the administrative procedures act does not, in this instance, constitute a reversible error. While the provisions of RCW 9.96A clearly provide a means of appeal which would defeat an effort to review by certiorari, the decision here was based upon both felony convictions and violation of traffic laws. The provisions of RCW 9.96A do not apply to the latter class of offenses.
