This appeal concerns water and gas plumbing work. We note first the basis of our jurisdiction. We then consider four issues which are dispositive. They are: (1)enforcement of the asserted illegal contract, (2) a trial amendment, (3) findings and conclusions of the trial court and (4) attorney fees.
Plaintiff sued defendant on the basis of plumbing work done. In his amended counterclaim, defendant alleged that defendant’s building was damaged by plaintiff’s negligence in doing the plumbing work. By this claim defendant sought damages on an issue based on tort. Section 16-7-8, N.M.S.A.1953 (Supp.1967), states that this court has appellate jurisdiction over any civil action which includes á count in which a party “seeks damages oil an issue based on tort.”
Plaintiff, a licensed plumber, performed emergency repairs on defendant’s water lines in December and replaced gas lines in January and February. During February, plaintiff applied for and received a permit from the Plumbing Administrative Board. Work was done on both the water and gas lines after the permit was obtained.
■ Defendant made payments on the work ■until the following June. In July, defendant directed plaintiff’s employees to leave his premises. The work was not complete at this time.
Plaintiff filed a mechanic’s lien for the unpaid balance on the work done. Subsequently, he sued for the alleged balance due and for foreclosure of the mechanic’s lien. Plaintiff recovered judgment in the trial court; defendant appeals.
Enforcement of the alleged illegal contract.
Defendant contends that the contract cannot be enforced because the contract is illegal. He asserts that the contract is illegal because of a statutory violation.
The statute is § 67-22-11, N.M.S.A.1953 (now repealed). It provides that a permit is to be applied for before certain plumbing work is done. Plaintiff did not apply for a permit until substantial work had been done on the gas lines. He violated § 67-22-11. Under § 67-22-21, N.M.S.A.1953 (now repealed) violation of § 67-22-11 is a -misdemeanor.
Does the violation make the contract illegal ?
By the contract, plaintiff provided work and materials to effect plumbing repairs. Plaintiff is licensed to do plumbing work. Black’s Law Dictionary 882 (4th ed. 1951) defines “illegal contract” as “an agreement with unlawful object and not merely lacking in valid subject-matter, but made for positively invalid purpose.” Compare Third National Exchange Bank v. Smith, 17 N.M. 166, 125 P. 632 (1912).
Here, we have neither an invalid subject matter nor an invalid purpose. The contract did not provide for nor require the violation of any law. It was not an illegal contract. Meissner v. Caravello, 4 Ill.App. 2d 428, 124 N.E.2d 615 (1954); Shedlinsky v. Budweiser Brewing Co., 163 N.Y. 437, 57 N.E. 620 (1900); 6 Williston on Contracts § 1767 n. 3 (rev. ed. 1938).
Did the violation make the contract void ?
The general rule is that transactions in violation of a statute prescribing *784penalties are void. However, there are exceptions to the rule. “The language of the statute, its subject matter and the purpose to be accomplished in its enactment, are matters of consideration * * Farrar v. Hood, 56 N.M. 724, 249 P.2d 759 (1952).
Neither the language nor the subject matter of the statute help to determine the effect of the statutory violation; § 67-22-11 is silent on the effect of failure to apply for a permit. Thus, this case is distinguishable from Kaiser v. Thomson, 55 N.M. 270, 232 P.2d 142 (1951), and Hogue v. Superior Utilities, 53 N.M. 452, 210 P.2d 938 (1949). In Kaiser, the statute involved provided there could be no recovery for noncompliance with the statute. In Hogue, the statute involved declared a public policy of strict regulation of the financial affairs of public utilities. Enforcement of the' contract was denied in both cases because of the express statutory language. Here, we have no such express language.
What was the purpose of the statute? Another section of the same legislative act, § 67-22-4, N.M.S.A.1953 (now repealed) indicates 'there are to be minimum standards for the installation, alteration and repair of plumbing for the purpose of protecting the lives, health and property of users of plumbing. To this end, permits are provided for. Work done under permit, or work done for which a permit is required, is to be inspected for compliance with the standards. Section 67-22-13, N.M.S.A.1953 (now repealed).
Defendant, the user to be protected by the permit here involved, was not injured by the delay in obtaining the permit. The work has been inspected. The inspector testified the work had been done in accordance with applicable standards, that he approved the work. Under these facts the purpose of the statute has been met. The contract is not void because plaintiff failed to apply for a permit as provided by the statute.
Although not void, is the contract unen'forceable ?
Defendant relies oh Desmet v. Sublett, 54 N.M. 355, 225 P.2d 141 (1950), which held that a person cannot recover where he must base his claim, in whole or in part, on a violation of criminal or penal laws. In Desmet, the plaintiff sought damages for loss of use of his truck on the public highways. His truck was not licensed to use the public highways. Violation of the licensing requirement was a misdemeanor. Since the damage claim was based on a statutory violation, the damage claim was denied.
Desmet is not applicable. Plaintiff’s claim is not based on the failure to obtain a permit under § 67-22-11. The claim is for labor performed and materials furnished in effecting repairs to plumbing. To establish this claim, plaintiff is not required to prove the statutory violation. See State v. Capital Bank, 32 N.M. 369, 257 P. 993, 53 A.L.R. 1356 (1927).
Comeaux v. Mann, 244 S.W.2d 274 (Tex.Civ.App.1951), states:
“If the contract as made could have been performed in a legal manner, the courts will not declare it void and unenforceable because it may have been performed in an unlawful manner.”
Meissner v. Caravello, supra, states:
“ * * * [T]he weight of authority holds that failure to obtain a building permit does not preclude recovery for work and materials furnished.”
This reasoning was applied in allowing recovery for plumbing work done without a permit in Ogilvy v. Peck, 200 Wash. 122, 93 P.2d 289 (1939). See Lew Bonn Co. v. Herman, 271 Minn. 105, 135 N.W.2d 222 (1965).
Plaintiff’s statutory violation does not prevent enforcement of the contract. See 6 Williston on Contracts § 1767 (rev. ed. 1938); State v. Capital Bank, supra; Baca v. Padilla, 26 N.M. 223, 190 P. 730, 11 A.L.R. 1188 (1920).
Section 67-22-11 authorizes the Plumbing Administrative Board, by order, to es*785tablish regulations for carrying out the purposes of the statute. By order, the Board, regulated the manner in which piping was to pass through'concrete or masonry walls. There is evidence that plaintiff violated this regulation. Defendant contends this violation renders the contract unenforceable.
The trial court found that the cost to comply with the regulation would be de minimis, that this cost had not been charged to defendant and that defendant prevented plaintiff from completing the plumbing work. There is evidence to support this finding.
Since we hold the contract is enforceable, we do not reach defendant’s contentions concerning the connection between the “legal” and “illegal” work and concerning unjust enrichment.
During the trial, plaintiff offered proof which varied from the issues framed by the pleadings in two ways. One was proof that he had overcharged defendant in the amount of $64.17. Defendant does not object to this. The other was proof of an undercharge on another item amounting to $94.25. Defendant objected that this proof was beyond the pleadings. The trial court sustained the objection. Plaintiff moved to amend his complaint in accordance with the evidence and for the purpose of showing the correct amount of the claim. The trial court reserved ruling on the motion. However, the findings, conclusions and judgment show that the /notion was granted in part.
Defendant makes two complaints concerning this trial amendment.
(1) He asserts that the trial court ha.d no authority to allow an amendment to increase the amount sued for. Section 21-1-1(15) (b), N.M.S.A.1953, answers this contention. It reads in part:
“.+. If evidence is objected to at the trial on the ground that it is not within the issues made by the pleadings, the court may allow the pleadings to be amended and shall do so freely when the presentation of the merits of the action will be subserved thereby and the objecting party fails to satisfy the court that the admission of such evidence would prejudice him in maintaining his action or defense upon the merits. * * * ”
Defendant does not show any prejudice to his defense as a result of the amendment.
(2) He asserts that since the action was to foreclose a mechanic’s lien, the trial court could not allow an amendment for an amount in excess of that claimed in the lien. Defendant mistakes what was done. Plaintiff sued for two things — for the balance due and for foreclosure of the lien. The trial amendment was allowed only for the claimed balance due. The trial amendment did not increase the lien claim; rather, the lien claim was reduced by the amount of the admitted overcharge and the lien was foreclosed for this reduced amount. The amount of the undercharge ($94.25) is allowed for the balance due; it is not included in the lien foreclosure.
Findings and conclusions of the trial court.
We have held that the contract is not illegal, is not void and is enforceable. We have held that the trial amendment was authorized. These holdings dispose of most of defendant’s attack on the findings and conclusions of the trial court and the claim that the trial court should have found and concluded as requested by defendant. Other contentions under this point are:
(1) The trial court found that it was necessary for plaintiff to remove surplus water and sewage in doing the plumbing work and that “plaintiff usually charges *786.$10.00 per load for removal of such material.” Defendant asserts that the basis for recovery is the “reasonable value” as opposed to “usual charge” and that there is no proof of the reasonable value of this service.
Plaintiff is competent to give his opinion as to the reasonable value of his services. Anderson v. Zweigbaum, 150 Conn. 478, 191 A.2d 133, 5 A.L.R.3d 941 (1963). Compare Hicks v. Maestas, 70 N.M. 347, 373 P.2d 916 (1962). Plaintiff testified as to the reasonable value of the services rendered in removing the surplus water and sewage.
(2) The trial court found that payments made by defendant were voluntarily made. Defendant contends that the payments were not “voluntary” in law because at the time defendant made the payments he did not know that plaintiff had failed to apply for a permit before beginning the work. It is not necessary to decide the question since we have held that the contract is enforceable. Accordingly, we treat this finding as surplusage.
(3) The trial court found that defendant failed to prove the damages alleged in his counterclaim. Defendant asserts error in this finding and in the refusal of his request to award damages on the counterclaim. Evidence as to this damage came from defendant and his witnesses. The trial court judges the credibility of the witnesses and has a right to refuse to believe this testimony. Allsup v. Space, 69 N.M. 353, 367 P.2d 531 (1961).
(4) The trial court found that plaintiff was entitled to payment for the plumbing work. It refused to find the work done and material furnished by plaintiff were worthless and not fit for the purpose for which the contract was entered. Defendant asserts the finding and the refusal of defendant’s requested finding was error. The evidence on this point is conflicting. It was for the trial court to resolve the conflict and say where the truth lay. Hughes v. Walker, 78 N.M. 63, 428 P.2d 37 (1967). It did so by its finding. The fact that there may have been evidence which would have supported different findings does not require a reversal for failure to adopt defendant’s requested finding which was contrary to the finding made. Varney v. Taylor, 77 N.M. 28, 419 P.2d 234 (1966).
Defendant complains of the action of the trial court in allowing attorney fees for the preparation of the mechanic’s lien and for its foreclosure. An allowance for attorney fees is authorized by § 61-2-13, N.M.S.A.1953. We will not change an allowance made by the trial court unless there is a manifest abuse of discretion. Montgomery v. Karavas, 45 N.M. 287, 114 P.2d 776 (1941). Here, the allowance was $225.00. This allowance was not a manifest abuse of discretion.
Plaintiff asks for attorney fees for services of his attorney on appeal. He cites § 18-1-37, N.M.S.A.1953 (Supp.1967) as authority for our setting the fee. But he sought attorney’s fees in the district court on the basis of § 61-2-13, N.M.S.A.1953, which he also cites here. We think the latter statute is proper authority, and § 18-1-37 need not be considered, even if it were proper to do so, which we do not decide.
Section 61-2-13 authorizes the allowance of attorney fees “in the district and Supreme Courts.” This statute was enacted before the Court of Appeals was established. Although the statute does not authorize an allowance of attorney fees in the Court of Appeals, the legislative intent is clear. The intent of § 61-2-13 is to authorize allowance of attorney fees in the trial and appellate courts. To deny an allowance for attorney fees in this court while authorizing such an allowance in the Supreme Court would be an absurd result. Ex Parte DeVore, 18 N.M. 246, 136 P. 47 (1913), states that statutes should be interpreted to avoid an absurd result. We hold that an allowance for attorney fees for *787services before the Court of Appeals is authorized under § 61-2-13.
Although authorized, we do not determine whether an allowance for services on appeal should be made in this case. That is to be determined by the district court. Dunson Contractors, Inc. v. Koury, 76 N.M. 723, 418 P.2d 66 (1966).
The judgment is affirmed. The cause is remanded to the district court so that it may exercise its discretion either to allow or disallow a reasonable fee for services of plaintff’s counsel in this court.
It is so ordered.
SPIESS, C. J., and OMAN, J., concur.