The opinion of the court was delivered by
Parker, J.:This is an original proceeding in mandamus to compel Charles F. Hobbs, commissioner of insurance of the state of Kansas, to issue the Fidelity Life Association, a foreign fraternal benefit society, a certificate of authority to transact business in this state. Upon application an alternative writ issued, to which defendant filed answer. Plaintiff then filed a motion for judgment on the pleadings and the proceedings are now before this court on such motion.
Before entering upon a discussion of the issue involved attention is directed to the fact that under our statute, G. S. 1935, 60-1709, the pleadings in a mandamus proceeding are (1) the writ and answer (State, ex rel., v. Stock, 38 Kan. 154, 179, 16 Pac. 106; Citizens Utilities Co. v. City of Goodland, 146 Kan. 172, 173, 69 P. 2d 318, and Pratt v. Fall River Township Board, 155 Kan. 442, 445, 125 P. 2d 357); and (2) to be construed as pleadings in a civil action (Crans v. Francis, Treas., 24 Kan. 750). Also, that like a motion to quash (Herd v. Estes, 154 Kan. 316, 321, 118 P. 2d 575; Scott v. Schwab, 70 Kan. 306, 308, 78 Pac. 443 and Crans v. Francis, Treas., supra), a motion for judgment on the pleadings is tantamount to and the equivalent of a demurrer which admits facts well pleaded and is only sustained where a cause of action is admitted by the answer and no facts are alleged therein which defeat the ad*165mission (Pennington v. Kross, 154 Kan. 667, 121 P. 2d 275; James v. Metropolitan Life Ins. Co., 155 Kan. 377, 125 P. 2d 369; Ewing v. Pioneer Nat’l Life Ins. Co., 158 Kan. 371, 374, 147 P. 2d 755; Northington v. Northington, 158 Kan. 641, 149 P. 2d 622; and Burton v. Mellor, 159 Kan. 262, 264, 154 P. 2d 108). Likewise, notwithstanding the only pleadings in mandamus are the writ and answer, this court has specifically held, pursuant to G. S. 1935, 60-1708, providing that when answer is made in mandamus the plaintiff is not concluded but may avail himself of any valid objections to its sufficiency, that a motion for judgment on the pleadings properly raises the question of whether the allegations' of the answer, taken as true, state a defense (State, ex rel., v. Reno County Comm’rs, 158 Kan. 573, 576, 148 P. 2d 1012).
The insurance code of this state, enacted by the legislature pursuant to the powers conferred upon it by our constitution, is found in G. S. 1935, chapter 40, as amended. Article 1 of such chapter confers broad and comprehensive powers upon the commissioner of insurance in the matter of the supervision and control of insurance companies which have been recognized and approved by this court in repeated decisions (Murphy v. Hobbs, 139 Kan. 799, 33 P. 2d. 135; National Mutual Casualty Co. v. Hobbs, 149 Kan. 625, 88 P. 2d 1006).
Article 2 contains general provisions with respect to all types of insurance companies. One of its sections is G. S. 1935, 40-201, which reads:
“For the purposes of this article the term ‘insurance company’ shall, unless otherwise provided, apply to all corporations, companies, associations, societies, persons or partnerships writing contracts of insurance, indemnity or suretyship upon any type of risk or loss: Provided, however, That this definition shall not be held to include fraternal benefit societies as defined in section 40-701 of this code or hospitals or hospital associations which have been in operation ten years or more.” (Emphasis supplied.)
Article 7, with which we are primarily concerned, includes sections 40-701 to 40-725, inclusive, and deals specifically with fraternal benefit societies. Further reference to some of its sections, in full force and effect at all times material to a disposition of the issues here involved, is necessary.
One prescribes the conditions under which a foreign society shall be issued a certificate authorizing it to transact business within the state, and reads:
“Any fraternal benefit society organized under the laws of any other state, *166province or territory, and not now doing business in this state, shall be admitted to do business in this state when it shall have filed with the commissioner of insurance a duly certified copy of its charter, and articles of incorporation, a copy of its constitution and bylaws, certified by its secretary or corresponding officer, and a statement of its business during the preceding year on the form required by section 40-225: And provided, That such society shall be shown to be authorized to do business in the state, province or territory in which it is incorporated or organized, in case the laws of such state, province or territory shall provide for such authorization; and in case the laws of such state, province or territory do not provide for any formal authorization of such society to do business therein, then such society shall be shown to be conducting its business in accordance with the provisions of this article. No such society organized under the laws of any other state, province or territory shall be admitted to do business in this state unless it is shown that one assessment upon its members at the current rates will produce sufficient funds to pay a claim, under its largest certificate in full. For all the purposes of this article the commissioner of insurance may personally, or by some person to be designated by him, examine into the condition, affairs, character and business methods, accounts, books, and investments of any fraternal benefit society at its home office; such examination shall be at the expense of the society: . . .” (G. S. 1935, 40-703.)
Another exempts all such societies from operation of other provisions of the code and in part states:
“. . . Such society shall be governed by this article and shall be exempt from the provisions of other insurance laws of this state and any law hereafter enacted unless they be expressly designated therein.” (G. S. 1943 Supp. 40-704.)
Still another pertains to decisions by the commissioner with respect to them and provides:
“None of the provisions of this article shall be construed as -vesting discretionary power in the commissioner of insurance, but his construction of and decisions under any section of this article shall stand and be binding on all parties in interest until reversed by a court of competent jurisdiction in an action in the nature of an action in mandamus, to be prosecuted at his or its own- cost, by any person or society dissenting from such construction or decision.” (G. S. 1935, 40-714.)
The alternative writ is somewhat lengthy. Ordinarily we would summarize its contents. However, because of the prevalence of an unusual situation with respect to the pleadings, to be revealed as this opinion progresses, we quote it in toto. It reads:
i
“Plaintiff is a fraternal benefit society organized, existing and operating under and by virtue of the laws of the State of Illinois and by virtue of a certificate of authority for the current insurance year, said certificate of authority being issued by the Director of Insurance of the State of Illinois.
*167n
“Defendant Charles F. Hobbs is the duly elected, qualified and acting Commissioner of Insurance of the State of Kansas.
in
“Plaintiff was first organized in 1896 and has continuously operated in its home state of Illinois since that time. Plaintiff was first admitted to do business in Kansas in March, 1902, and until the time for the issuance of the certificate of authority to do business in Kansas for the insurance year beginning May 1, 1944, has continuously done business in the State of Kansas by virtue of certificates of authority issued to it by the Insurance Commissioner of the State of Kansas.
IV
“Prior to May 1, 1944, and in accordance with the laws of the State of Kansas, plaintiff filed with the Commissioner of Insurance of the State of Kansas a copy of its annual statement showing the' condition of its business as of December 31, 1943, and filed an application for a renewal of its certificate of authority to do business in Kansas. Plaintiff furnished the defendant with plaintiff's check in payment of the fees for the renewal of such certificate, all in accordance with the laws of the State of Kansas, and also furnished proof to the defendant that it was licensed to do business in the State of Illinois. Plaintiff states that it complied with all the provisions of law entitling it to a certificate of authority to do business in Kansas, but that notwithstanding the defendant refused to issue plaintiff a certificate of authority for said insurance year. A true and correct copy of the Illinois certificate of authority for the current insurance year is hereto attached, marked Exhibit 'A,' and made a part hereof.
v
“Prior to May 1, 1945, and in accordance with the laws of the State of Kansas, plaintiff filed with the Commissioner of Insurance of the State of Kansas a copy of its annual statement as of December 31, 1944, and thereafter filed an application for a renewal of its certificate of authority to do business in Kansas. Plaintiff furnished the defendant with a check in payment of the fees for the renewal of such certificate, all in accordance with the laws of the State of Kansas, and also furnished proof to the defendant that it was licensed to do business in the State of Illinois for the current insurance year.
“Plaintiff further states that it complied with all the provisions of the laws of the State of Kansas entitling it to a certificate of authority to do business in Kansas for the current insurance year, but that notwithstanding the defendant has refused to issue plaintiff a certificate of authority for the insurance year beginning May 1, 1945.
“A true and correct copy of the application for a certificate of authority to do business in the State of Kansas is attached hereto, marked Exhibit ‘B,’ and made a part hereof.
“A true and correct copy of the Illinois certificate of authority for the current year is hereto attached, marked Exhibit ‘C,’ and made a part hereof.
*168VI
“Plaintiff states that as of December 31, 1944, it had in force $55,070,313.00 of insurance, and $4,213,497.00 of this amount was in force in the State of Kansas. The total amount of admitted assets was $13,042,003.91. That said Society had certificate reserves in the amount of $10,968,103.14, and in addition thereto and as an added protection to the interests of the certificate holders an unassigned fund or surplus of $1,672,552.88. That this information is contained in the annual statement of plaintiff’s business as of December 31, 1944, a copy of which was filed with the defendant prior to the time of the application for the issuance of a certificate of authority to do business in the State of Kansas for the insurance year beginning May 1, 1945.
VII
“Plaintiff states that it has filed with the defendant duly certified copies of its charter and articles of incorporation, constitution and bylaws, certified by its secretary, and the annual statements of its business for each and every year it has done business in Kansas; that it has shown the defendant that it is authorized to do business in the State of Kansas; that it has shown the defendant that one assessment upon its members at the current rates will produce sufficient funds to pay a claim in full under the largest certificate, all of which is in accordance with the provisions of G. S. 1935, 40-703, relating to foreign fraternal benefit societies.
“The last examination of the plaintiff was a convention examination participated in by the Kansas department, and a copy of the same is in the possession of the defendant.
VIII
“Plaintiff states that the defendant has refused to issue to it a certificate of authority to do business in the State of Kansas for the insurance year beginning May 1, 1945, and unless accorded relief by this court and by the issuance of a writ of mandamus, the defendant will continue to refuse to issue to said plaintiff a certificate of authority to do business in the State of Kansas.
IX
“Plaintiff states that it has no plain, adequate or complete remedy in the ordinary course of law and as a matter of right is entitled to have issued to it a certificate of authority as provided by law, authorizing it to do business in the State of Kansas for the insurance year ending May 1, 1946, and that plaintiff and its members will suffer irreparable damage and injury if the court does not make an order directing said defendant to issue to plaintiff a certificate of authority.”
In his answer defendant admits in their entirety the allegations of paragraph 1 to 8, inclusive, of the writ and denies only the averments found in paragraph 9. Summarized, remaining material allegations thereof predicate his defense solely upon the proposition that because G. S. 1935, 40-214, one of the sections to be found in article 2 of the code, provides that it shall be unlawful for any in*169surance company to transact business' within the state without having obtained from the commissioner a certificate of authority so to do, and since the plaintiff continued to and did do business in the state subsequent to May 1, 1944, without procuring it, he had the right on that account under the broad powers conferred upon him by the code to refuse it a certificate of authority to do business in the state during the insurance year commencing May 1, 1945, irrespective and regardless of whether it would otherwise, by full aiid complete performance with other sections of our statute, be entitled to that privilege.
At this point, in the interest of clarity and definiteness, it should perhaps be stated that an examination of the pleadings together with an analysis of section 40-703 and other pertinent portions of the statute makes it clearly apparent that prior to May 1, 1945, the plaintiff had fully complied with all existing requirements of law with respect to admission and was entitled to a certificate of authority unless the reason assigned by defendant in his answer for refusing to issue it was one granted him by the statute and constitutes a sound legal ground for his refusal to do so. In fact defendant does not, nor could he in view of his admissions, seriously contend otherwise. Therefore, we proceed with our determination of whether a peremptory writ shall issue with that situation as definitely established.
Likewise, it should be said we proceed also, without further reference to somewhat extensive averments to be found in the answer pertaining to efforts of plaintiff to procure a certificate during the insurance year commencing May 1, 1944, and the action of defendant in refusing to issue it as well as his activities in connection with the illegal transaction of business by the company during that insurance year, for the obvious reason that all such allegations become immaterial when — as here — the sole issue as framed by the pleadings is whether the fact a fraternal benefit society has been doing business within the state without a certificate bars it from obtaining one for the insurance year commencing May 1,1945, when on making application for authority to legally transact business therein it meets the requirements of section 40-703.
In approaching a solution of the problem we are not unaware of our decisions to the effect that so far as certain types of insurance companies are concerned decisions by the commissioner of insurance in granting, refusing or revoking licenses authorizing insur*170anee companies to transact business within the state involves the exercise of official judgment and discretion which cannot be controlled or directed by mandamus. Nor do we forget we have said the ordinary rule is that it is only where a state officer’s executive or administrative discretion has been abused or where there has been a failure or refusal to perform an official duty that the courts are authorized to interfere. (Insurance Co. v. Wilder, 40 Kan. 561, 20 Pac. 265; National Mutual Casualty Co. v. Hobbs, 149 Kan. 625, 633, 88 P. 2d 1006.)
However, we are equally mindful of other legal principles applicable to the commissioner of insurance which are just as fundamental, if not more so than the ones to which we have last referred and are so elemental as to require no citation of authorities. One is that the legislature makes the law and that its fiats must be observed by him. Another is that the statute is the source of his power and all of his acts must be within the limits of the authority it confers upon him. Still another is that it is the province of the courts to construe the statute and, when called upon to do so, determine the scope of his official authority. And lastly, another is that it is not for the courts to substitute their judgment for that of the legislature but to give its enactments the force and effect the language found therein requires.
That it was the intent and purpose of the legislature to place fraternal benefit societies in a class by themselves, make them amenable to conditions and subject them to regulatory powers and supervision different from those of insurance companies in general cannot be a subject of doubt when section 40-201, to which we have already referred, is carefully read and critically analyzed.
What then is the extent of the power possessed by the defendant with respect to the admission of fraternal benefit societies to do business within the state? The answer to this question must be found in the statute to which we now direct our attention.
Section 40-703, heretofore quoted, sets forth the conditions under which they may be admitted and requires they shall be admitted when its requirements are met. Section 40-704, also quoted, provides they shall be exempt from other insurance law provisions unless they be expressly designated therein. Section 40-714, likewise quoted, expressly directs that none of the provisions of the article, in which it appears, shall be construed as vesting discretionary power in the commissioner of insurance. We find nothing *171in article 7 which permits the commissioner to refuse such a license upon the ground they have theretofore transacted business illegally without that authority. Nor do we find any section of the code, which authorizes him to exercise his discretion in that regard with respect to other classes of insurance companies, wherein fraternal societies are expressly designated and therefore subject to their terms. No case is cited by the commissioner which holds that he has the power to withhold a certificate under the circumstances here involved and our research discloses none.
In giving the sections of the statute just mentioned the force and effect to which they are entitled under the usual and ordinary rules of judicial construction it appears that so far as fraternal benefit societies are concerned when they have complied with all the requirements of section 40-703, as is here conceded, the duties of' the commissioner thereafter are ministerial rather than administrative in character and that applicable in this case is the rule announced in our early decision of Phoenix Ins. Co. v. Welch, Supt., 29 Kan. 672, where we said:
“Now, in this section is absolutely and finally prescribed the rule and measure of license. It is not left to the state superintendent to determine what the rule shall be. His duty is simply to ascertain the facts and apply the rule. He may not arbitrarily determine upon what conditions the plaintiff may enter this state; he can only enforce the condition which the legislature has imposed. It is time the extent of those conditions may vary in different cases, but the rule to determine the variance is not left to his judgment, but is prescribed by the legislature.” (p. 676.)
It follows we are forced to conclude that the commissioner’s answer which admits the plaintiff complied with all the provisions of the law entitling it to a certificate of authority to do, business in Kansas for the insurance year ending May 1, 1946, and merely states that his refusal to issue such certificate was based upon the sole premise the company prior to May 1, 1945, had transacted business within the state without authority, fails to state a defense to the writ and requires the sustaining of plaintiff’s motion for judgment upon the pleadings.
Perhaps it may be suggested that the conclusion just reached is not in harmony with our decision in National Mutual Casualty Co. v. Hobbs, supra. A careful reading of the opinion in that case will reveal the contrary. There the question was exercise of official discretion uncontrollable by mandamus, while here the commissioner had no discretion, mandamus is expressly authorized as a remedy *172and involved also is failure to perform an official duty enjoined by statute.
Not overlooked in the course of our consideration of the question involved have been three propositions urged by defendant in sui port of his position.
One is that section 40-214 makes it unlawful for any insurance company — including a fraternal benefit society — to transact business within the state without due authorization. Quite so, and G. S. 1935, 40-254, provides a penalty for each and every violation. The difficulty is that defendant fails, as we have heretofore indicated, to show where such a violation or violations are grounds for refusal to issue a certificate of authority.
A second is that the following language found in section 40-703 was intended not only to give defendant authority to refuse the issuance of a certificate of authority but charges him with a duty not to issue it:
“. . . For all the purposes of this article the commissioner of insurance may personally, or by some person to be designated by him, examine into the condition, affairs, character and business methods, accounts books, and investments of any fraternal benefit society at its home office; such examination shall be at the expense of the society:
We agree that when a fraternal society makes application it is defendant’s duty to conduct the examination authorized in the foregoing section and if that examination discloses it is in such condition it should for any reason stated in the article dealing with fraternal societies be refused admission, of a certainty, it is his duty not to issue the certificate. The trouble is defendant’s argument is fallacious in several particulars. In the first place, for reasons which need not be repeated, we do not concur in his view the language found in article 7, or elsewhere in the code, evidences an intention to permit him to refuse a certificate solely on the ground the plaintiff had transacted business in the state without one. In the next, he fails to plead he refused a certificate because of the fact he was conducting an examination for any of the purposes named in such article. And finally, as we have herein indicated, an examination with .the idea of determining whether the plaintiff had transacted business in the state without a license, which is the only allegation with respect to any examination to be found in his answer, is not one of the purposes contemplated by section 40-703 or in article 7 where such section appears.
*173The scope of this opinion is limited to determination of the authority vested in the commissioner by statute under facts and circumstances of the instant case as disclosed by the pleadings. We do not for a moment condone conduct on the part of the plaintiff in transacting business within the state without first having procured a certificate as required by the law. What we hold is that such action, assuming but not prejudging its occurrence, did not bar it from obtaining a certificate which would permit it to legally operate. Nor do we share defendant’s alarm over the result of our decision. The code makes ample provision for protection of the public interest notwithstanding. Without attempting to enumerate all of them reference to a few of the remedies available will suffice to demonstrate the correctness of our last statement. Prior to the procuring of a certificate defendant might have been prosecuted for doing business without one (40-214) and upon conviction been punished for each violation (40-254); it might have been enjoined under provisions of chapter 60, article 11, G. S. 1935, or subjected to a proceeding in the nature of quo warranto (G. S. 1935, ch. 60, art. 16). Once it was admitted, its transgressions when they came to the notice of the commissioner were subject to injunction and it could be excluded from the state (40-713); for failure to make its annual statement or reply to any proper inquiry of the commissioner, it was subject to a severe penalty (G. S. 1935, 40-226) and, to enforce any order made or action taken by him against it in pursuance of law defendant could, through the attorney general of the state, invoke the aid of any court of competent jurisdiction. (G. S. 1935, 40-251.)
From the conclusions herein stated it appears that a peremptory writ of mandamus should issue to defendant requiring him to grant the plaintiff authority to do business in this state, and it is so ordered.