ON MOTION FOR REHEARING
Upon rehearing, the opinion originally filed is withdrawn and the following substituted :
Research Park, Inc., a landowner,- has appealed from personal judgments against it in favor of a general contractor and two subcontractors with whom it had no contractual relations, and from judgments foreclosing mechanic’s and materialmen’s liens against its land.
First American Indian Land, Inc. leased the land from Research Park, Inc. and contracted for the construction of certain structures thereon with Joe R. Martinez, d/b/a Marco Construction Company (hereinafter termed Marco). C. B. Roache, d/b/a B & D Electric Company (hereinafter termed Roache) and H. A. Jewsbury, d/b/a Yucca Plumbing & Heating (hereinafter termed Yucca) were subcontractors. All three filed claims of lien for amounts claimed to be unpaid under their respective contracts. The two subcontractors were made defendants in an action by Marco to foreclose his lien, and they each cross-corn*676plained against Research Park, Inc. seeking foreclosure-oh ¡their respective liens. '
■■ The parties stipulated that the claims of liens were'in proper form; that they stated the correct amounts due; that they were timely filed; and that the only issue before the trial court was whether a non-responsibility notice was posted by Research Park, Inc. in accordance with § 61-2-10, N.M. ‘S.A.1953. Marco, Roache and Yucca were awarded personal judgments against Research Park, Inc. for the amounts of their unpaid respective claims. The judgment also ordered foreclosure of the respective . liens. ■
Counsel for the lienholders concede that the personal judgments entered against Research Park, Inc. are erroneous and require a reversal, since we held in Home Plumbing and Contracting Company v. Pruitt, 70 N.M. 182, 372 P.2d 378, and in Allison v. Schuler, 38 N.M. 506, 36 P.2d 519; that that personal judgment cannot be granted where there was no contractual relationship between the landowner and'the lienors.
Because other questions argued will immediately ari^e . upon remand, which .we think will require our disposition, we consider them at this time.
The Contractors’ License Law, §§ 67-16-1 through 67-16-20, N.M.S.A.1953, requires contractors to be licensed, and Section 14 not only provide a criminal penalty but .also imposes a forfeiture of the right to invoke the aid of tlie courts in the collection of compensation for the performance of construction work by an unlicensed contractor. The pertinent portion of the forfeiture clause reads:
“No contractor as defined by section 3 of this act shall act as agent or bring or maintain any action in any court of the state for the collection of compensation for the performance of any act for which a license is required by this act without alleging and proving that such contractor was a duly licensed ' contractor at the time the alleged cause of action arose.”
Since neither Marco nor Roache alleged that they we re licensed contractors, the landowner argues that their complaints fail to state a cause of action and, by reason thereof, challenges, the jurisdiction of the trial court. The cross-complaint of Yucca cannot be questioned on the jurisdictional ground because he did allege a license.. .
Clearly, foreclosure of a mechanic’s lien arising out of a construction contract is an action seeking “collection of compensation for the performance” of such work. An allegation that the contractor was duly licensed is a statutory prerequisite to bringing such an action. It naturally follows that this allegation is essential in order to state a claim for relief,- and. we have consistently held that failure to state *677a cause of action is jurisdictional and may be raised for the first time on appeal. Campbell v. Smith, 68 N.M. 373, 362 P.2d 523.
Since the forfeiture clause only denies the right to bring an action to those contractors "defined by section 3 of this act” (§ 3, Ch. 197, Laws 1939) who were not licensed "at the time the alleged cause of action arose,” it becomes necessary at the outset to determine whether Marco and Roache were such contractors. That determination depends upon what is meant by the term "at the time the alleged cattse of action arose.” If it means after breach by non-payment, it may well be that the forfeiture clause is unenforceable because of an express repeal of § 3, Ch. 197, Laws 1939 (§ 67-16-3, N.M.S.A. § 1953) by § 1, Ch. 222, Laws 1961, effective July 1, 1961. As an aid in arriving at what the legislature meant by such term, it is important to decide whether the legislature intended contractors to be licensed when the contract was entered into and the work performed, or only at the time a breach of the construction contract occurred because of non-payment by the owner.
It is a familiar rule of statutory interpretation that statutes are to be interpreted with reference to their manifest object, and “if the language is susceptible of two constructions, one which will carry out and the other defeat such manifest object, it should receive the former construction.” 2 Sutherland, Statutory Construction, § 4704. In applying this rule to a statute, the intention of the lawmaker will prevail over the literal sense of the terms, and its reason and intention will prevail over the 'strict letter. A statute should be construed, if possible, to give effect to all of its provisions and so that one part will not destroy another. 2 Sutherland, Statutory Construction, § 4705; Reed v. Styron, 69 N.M. 262, 365 P.2d 912. Applying these principles, we look at the entire Contractors’ License Law and find that § 67-16-3, N.M.S.A.1953 makes it unlawful to engage in the business or perform any act of a contractor without having a license, unless such person is particularly exempt as provided by the act. The criminal penalty imposed by the first paragraph of section 14 for acts performed by an unlicensed contractor has previously been noted. An additional forfeiture is provided by section 67-16-16, N.M.S.A.1953, which states that:
“Any contractor operating without a license as herein provided 'shall have no right to file or claim any mechanic’s lien as now provided by law, * *
It is thus clear from a reading of the statute as a whole that its purpose and object was to require licensing of those engaging in the contracting business, and that such a license is contemplated at the time the contract is entered into and the work is per*678formed, so as to protect the public from unqualified contractors.
Ordinarily, a cause of action exists only when there is a concurrence of a right, a duty and a breach. See Jensen v. Allen, .63 N.M. 407, 320 P.2d 1016; London v. Bruskas, 64 N.M. 73, 324 P.2d 424. But, even though the forfeiture clause of section 14, supra, implies that a contractor may bring a suit if he had a license when a breach of his contract occurred, it is nevertheless well settled that one cannot maintain a suit if, in order to establish his cause of action, he must rely, in whole or in part, upon an illegal act or transaction to which he is a party, or where he must base his cause of action, in whole or in part, on a violation by him of the criminal or penal laws. Desmet v. Sublett, 54 N.M. 355, 225 P.2d 141; Garvin v. Gordon, 36 N.M. 304, 307, 14 P.2d 264. If Marco or Roache, while unlicensed, engaged in a single act prohibited by the statute, they were guilty of a misdemeanor.
It is, of course, axiomatic that to state a cause of action the complaint must allege facts which, if established, would entitle the party to the relief sought. We held in Crawford v. Holcomb, 57 N.M. 691, 262 P.2d 782, that a contractor who was unlicensed when the contract was entered into and a large part of the work performed could not validate the prior illegal contract and recover thereon by securing a- license before default in payment occurred. It logically follows that a complaint which merely alleged that the contractor was licensed at the time the owner defaulted in payment would not be sufficient to state a cause of action. Certainly it would be absurd to provide that an action might be brought by a contractor who obtained his license after the work was completed and just before the owner defaulted, but at the same time to deny him recovery because the work was performed while he was unlicensed. We cannot impute such an intention to the legislature, and it is, therefore, obvious that they did not use the term “at the time the alleged cause of action arose” in its ordinary sense.
Since the legislature has made illegal the entry into a construction contract or the performance of any act or work by an unlicensed contractor and has imposed a criminal penalty and prohibited the filing or claiming of any mechanic’s lien by a contractor who was unlicensed when the work was performed, it is apparent to us that its intention was to prohibit the bringing of an action to enforce such an illegal contract or to recover compensation for work so illegally performed.
Applying the rules of construction supra, we will not sacrifice the manifest reason and obvious purpose of the law to a^ literal interpretation of the words “at the time the alleged cause of action arose.” *679•Our particular inquiry is not into the abstract meaning of those words, but in what sense were they intended to be used in this particular act. As we have observed, the obvious intention of the legislature throughout the act was to render any acts by unlicensed contractors illegal unless such contractors were specifically exempt from the licensing requirement. We hold that, as used in the Contractors’ License Law, the term “at the time the alleged cause of action arose” means when the contract was entered into or the work performed. Both Marco and Roache were contractors required to be licensed at that time, so that failure to allege the required license constituted a failure to state a cause of action.
Notwithstanding such failure, the trial court found that Marco was licensed as a general contractor and that Roache was licensed as an electrical contractor. No evidence has been pointed to in the record to support either finding. They insist that the stipulation agreeing that the only remaining issue was that of posting a non-responsibility notice amounted either to a waiver of failure to plead existence of the license or to an admission that Marco and Roache were licensed. Jurisdiction of the subject matter cannot be conferred by consent, much less can it be waived. Atchison, T. & S. F. Ry. Co. v. State Corporation Commission, 43 N.M. 503, 95 P.2d 676. We find nothing in the stipulation which could authorize the court to find'as a fact that these contractors were licensed. ' ■;
Marco’s contention that his complaint should be treated as amended to allege that he held the required license is without merit. This is not a situation where a complaint will be deemed amended to conform to proof admitted in evidence. Such a license was neither offered nor admitted in evidence, and, unlike Canavan v. Canavan, 17 N.M. 503, 131 P. 493, the doctrine of aider by verdict is not applicable to cure the defect.
Roache is in the same predicament as Marco in the failure of the cross-complaint to allege a license. On rehearing, however, Roache concedes that he does not have a contractor’s license pursuant to §§ 67-16-1 through 20, N.M.S.A.1953, but in oral argument asserts that he is only required to have an electrical contractor’s license pursuant to § 67-19-8, N.M.S.A.1953. He asks us to direct the trial court to permit him to amend by alleging such electrical contractor’s license. Opposing counsel admits that Roache has the license required by the electrician’s act (§§ 67-19-1 through 21, N.M.S.A.1953), but asserts that even so the complaint fails to state a cause of action.
The law has long recognized the principle that amendments to.pleadings are favored, and that the right, thereto should be liberally permitted in the further*680anee of justice. Newbold v. Florance, 54 N.M. 296, 222 P.2d 1085; Vigil v. Johnson, 60 N.M. 273, 291 P.2d 312; § 21-1-1(8) (f), N.M.S.A.1953; §21-1-1(15) (a), N.M.S.A. 1953. Further, when a complaint has been dismissed by the trial court for failure to state a cause of action, the party may amend as a matter of course, Rule 15(a) (§ 21-1-1(15) (a), N.M.S.A.1953), since a motion to dismiss is not a responsive pleading. Whittemore v. Continental Mills, 98 F.Supp. 387 (S.D.Maine 1951). A situation similar to that confronting us here was presented in Campbell v. Smith, 68 N.M. 373, 362 P.2d 523, where the failure to allege a contractor’s license was first raised on appeal and we held that by reason thereof the complaint failed to state a cause of action and the court was without jurisdiction to proceed to judgment, but we remanded the case with instructions to permit the party to amend his complaint as would have been the case if the complaint had been dismissed by the trial court. Star Realty Company v. Sellers, 73 N.M. 207, 387 P.2d 319, is distinguishable upon its facts because there the complaint alleged the license but the record failed to disclose proof of the allegation.
In view of the argument on rehearing, and assuming that Roache’s cross-complaint might be amended to allege possession of an electrician’s license, we must now determine whether such an allegation would state facts entitling him to relief.
Section 67-16-2, N.M.S.A.1953, defines a “contractor” as a person or organization who “undertakes * * * or purports to have the capacity to * * * construct, alter, repair, add to or improve any building, * * * or other structure * * * or any part thereof.” It cannot be denied that Roache falls within this broad statutory definition. A further provision of the Contractors’ License Law, § 67-16-3, N.M. S.A.1953, makes it:
“ * * * unlawful for any person, firm * * * or other organization * * * to engage in the business * * * within the state without having a license therefor as provided in the Contractors’ License Law [67 — 16— 1 to 67-16-19], unless such person, * * * is particularly exempt from the provisions of the Contractors’ License Law. * * * ” (Emphasis added).
Roache argues that since he is required by § 67-19-8, N.M.S.A.1953 to be licensed under the electrician’s law, we should read it together with the contractors’ license law and construe the provisions of §§ 67-19-1 through 21, N.M.S.A. 1953, as particularly exempting electrical contractors from the provisions of the contractors’ license law (§§ 67-16-1 through *68120). We find nothing in the electrician’s law which particularly exempts such contractors from the requirements of the contractors’ license law.
“Specialty contractors,” including electrical contractors, were specifically exempted from the operation of the contractors’ license law by § 2(g), Ch. 197, Laws 1939, but that express exemption was removed by amendment in 1943 (Ch. 76, Laws 1943), and the entire section defining contractors within the meaning of the contractors’ license law was repealed and a new section defining contractors enacted by Ch. 222, Laws 1961. It is a familiar rule of statutory construction that the adoption of an amendment is evidence of an intention by the legislature to change the provision of the original law. 2 Sutherland, Statutory Construction, § 5015. See Bindczyck v. Finucane, 342 U.S. 76, 72 S.Ct. 130, 96 L.Ed. 100; Modern Dairy Co. v. Department of Revenue, 413 Ill. 55, 108 N.E.2d 8. In Bills v. All-Western Bowling Corporation, 74 N.M. 430, 394 P.2d 274, this court said:
“ * * * We can only say that the legislature intended what was enacted. That this court would have used other language, does not warrant a disregard for the legislative mandate. * * * ”
Statutory meaning is to be ascertained primarily from its terms, and where they are plain and unariibiguous, there is no room for construction. Hendricks v. Hendricks, 55 N.M. 51, 226 P.2d 464; Gonzales v. Sharp & Fellows Contracting Co., 51 N.M. 121, 179 P.2d 762. The clear language here is that Roache is required to have a contractor’s license unless the contractors’ license law elsewhere particularly exempts him from that requirement.
We are aware that § 67-16-18, supra, deprives the contractors’ license board of the power to “issue orders prescribing minimum standards for the construction, alteration or repairing of buildings” in connection with electrical wiring. But to hold that because the board has no power to regulate the performance of electrical contractors by specific orders, it also has no power to license such contractors, would be judicial legislation of the most flagrant and repugnant nature. It is plain that the effort here is to have us accomplish by judicial construction what is clearly a proper subject of legislative enactment. The language of the statute is so plain and unambiguous as to need no construction. If electrical contractors should not be licensed under the contractors’ license law, the legislature and not the court is the place to enact an appropriate change in the law.
We agree that long-standing interpretations . of a doubtful or uncertain statute by the administrative agency charged with administering the statute are *682persuasive and will not be lightly overttirned'by the courts. Ortega v. Otero, 48 N.M.1 588; 154 P.2d 252; Valley Country Club, Inc. v. Mender, 64 N.M. 59, 323 P.2d 1099; State ex rel. Dickson v. Aldridge, 66 N.M. 390, 348 P.2d 1002. However, no rulS-’of ’ regulation of the contractor’s license ; board has been pointed out to us which réquires an interpretation that electrical contractors meeting the definition of. .§''671-16-2, N.M.S.A.1953, need not be licensed by that board. The fact that the board has not specifically classified electrical 'contractors as being required to have a license does not evidence an administrative interpretation that it lacks such jurisdiction over electrical contractors because it has expressly retained the authority to include additional classifications. It is clear to us that the contractor’s license board merely followed an Attorney General’s opinion that the legislature did not intend electrical contractors to be licensed by both boards. Such an opinion is in no way binding upon us, and we will refuse to be persuaded thereby, when, as here, we deem it erroneous.
Research Park, Inc. contends that the judgment must be reversed as to Yucca for failure of the trial judge to comply with Rule 52(B) (5) which requires him to mark requested findings and conclusions "refused” when they were not adopted. It is true that the court did not, as required by the rule, mark each requested finding "refused” where it was not adopted. However, in Edwards v. Peterson, 61 N.M. 104, 295 P.2d 858, where the court included in its decision a statement that all findings and conclusions at variance with those made by court were refused, it was said that the failure was not prejudicial and did not require reversal. In the instant case, the court marked “refused,” with the initials of the judge, on the first page of the requested findings and conclusions. While not a literal compliance with the rule, it is clear that the court refused the requested findings and conclusions and so indicated on the tendered instrument. We are unable to see how the court’s action resulted in prejudice to Research Park, Inc.
Finally, Research Park, Inc. urges that the court abused its discretion in denying permission to reopen the case to permit the president of the corporation to testify. The record discloses that, in connection with the request, counsel advised the court that the offered testimony would be only cumulative. We find no abuse of discretion in denying the request.
It follows that the personal judgments in favor of Marco, Roache and Yucca must all be reversed; the judgments granting foreclosure of the liens of Marco and Roache are reversed; and the foreclosure of Yucca is affirmed.
*683The case will be remanded with instructions to vacate the judgment appealed from and to permit Marco to amend to state a cause of action if he be so advised, and to proceed further in a manner not inconsistent with this opinion.
It is so ordered.
CARMODY, C. J., and CHAVEZ, J., concur.