
185 Cal.App.3d 929 (1986)
229 Cal. Rptr. 910
THE PEOPLE, Plaintiff and Respondent,
v.
ALBERT H. BUTCHER, JR., Defendant and Appellant.
Docket No. 13223.
Court of Appeals of California, Third District.
September 22, 1986.
*932 COUNSEL
Caryl Warner and Janet McGinnis for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Roger E. Venturi and Maureen A. Daly, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
BLEASE, Acting P.J.
Defendant was convicted after a court trial of one felony count of violation of Penal Code section 484b, the diversion of construction funds. On appeal he presents two important questions of interpretation of the statute. The first is whether use of construction funds in good faith to defray project expenses other than those listed in an application for a progress payment is a diversion. We answer "no." The second is whether a diversion must cause failure to complete construction or failure to pay for services, labor materials, or equipment used in the construction in order to warrant a conviction. We answer "yes." We will reverse the defendant's conviction because the trial court appears to have grounded its determination upon an affirmative answer to the first question.

FACTS
Defendant contracted in writing on May 31, 1979, to build a house for his friend William Altaffer pursuant to plans filed with the Mono County Building Department. The contract provided that Altaffer was to pay defendant $110,000 in installments as "described by Bank of America Mammoth Lakes" and defendant was to "pay promptly all valid bills and charges for material, labor or otherwise in connection with or arising out of the construction of said structure...." The construction was to be financed by a loan from the Bank of America.
Defendant prepared an estimate of costs for completion of the project on a printed form sheet listing the various items of material, labor, and services entailed in constructing a house. The estimate is deficient in that no cost *933 figures are set forth for many items, e.g., "Heating, Vent, Air Condition" and "Overhead & Profit."
To draw on the construction loan defendant was required to submit a form entitled "Construction Progress Report." The form incorporated the estimate for costs with extension columns for reporting the percentage of these costs accruing in the course of construction to date. Defendant and Altaffer were required to sign the form and give it to the bank. The bank would send the report to an appraiser who would visit the building site and verify the report. If the appraiser approved the report the bank would make a progress payment.
Construction on the house began at the end of June or early July 1979. Altaffer paid $1,200 for the building permit, $842.71 for the water meter permit, and $700 for site preparation out of his own funds. He testified that he was to be repaid for these outlays at the end of construction or would receive a credit against overage at that time. Because the loan was delayed, Altaffer advanced defendant $4,000 to pay for labor. Altaffer testified that his arrangement with defendant provided that he would be reimbursed for all of his outlays at the time of the first draw on the construction loan.
Altaffer is a high school teacher. In the summer he has a job that takes him out of the country. To cover this period of absence he signed three blank "Construction Progress Report" forms. When Altaffer left Mammoth Lakes on July 15th the house had been framed and the roof was done. On July 10, 1979, defendant filled out one of the signed forms, reporting various cost items including 70 percent of rough plumbing and 100 percent of the building permit, water meter, survey, temporary facilities, demolition and site preparation, earthwork, structural concrete, rough lumber, rough carpenter labor, window frames and sash, and architectural and engineering fees. These items totaled $58,256.71. Defendant included the cost of materials that were on order and expected to arrive within a few days. The bank's appraiser verified the claim with the notation that the inspection showed substantial agreement with the form defendant submitted. On July 25, 1979, the bank issued a check for $52,431.04 to defendant. The bank retained 10 percent of this amount pending completion of the project. Defendant negotiated the check receiving $12,431.04 in cash and $40,000 in a cashier's check.
On July 26, 1979, defendant deposited the $40,000 check into his business account at the Bank of Irvine. The balance in the account after the deposit was $40,069. On July 27, 1979, defendant wrote a check on the account for $11,210.46 payable to Home Lumber. Defendant had contracted to build three houses in Mammoth Lakes during the same general period; the others *934 were for a Mr. Boe and a Mr. Raymond. Defendant went to Home Lumber and paid the outstanding balance of $11,210.46. Home applied $2,644.07 of this sum to the Altaffer account, $7,780.63 to the Raymond account, and $785.76 to the Boe account. Defendant testified that this allocation was erroneous since no lumber had been delivered or billed for the Raymond job. In his opinion $8,566.39 should have been credited to the Altaffer account and the remainder to the Boe account. At the time he made the payment defendant thought a little over $7,000 would go to the Altaffer account. Home Lumber's records reflect that invoices for lumber ordered on the Altaffer job prior to July 26, 1979, totaled $19,017.74.
On July 29, 1979, defendant wrote a check on the Bank of Irvine account in the sum of $12,000 payable to Ron Harris for a Porsche. He testified that he returned $10,000 of this money to the Altaffer job in September with proceeds from a bank loan to finance the car.
Altaffer had the plans for his house prepared by Sandra Brodrick and her associate. Brodrick billed Altaffer $1,615 for her services. She was never paid. Neither Brodrick nor her associate were licensed as architects. Altaffer asked Brodrick to keep an eye on the construction project in his absence. On July 17, 1979, Brodrick questioned the framer about some construction techniques. She was unsure if the construction was being performed correctly. She telephoned Tom Hill in the county building department and he suggested they look at the house together. After they had conferred Hill "red-tagged" the project on July 19, 1979. A red-tag halts construction until noted deficiencies are cleared.
After the red-tag the plans were modified. The building department insisted that an engineer approve them. The engineer required numerous modifications of the structure. Defendant testified that because the original plans were improper the costs of construction were significantly higher than estimated. At some point Home Lumber, Harshbarger Glass, and Brodrick filed mechanic's liens on the house. The Bank of America retained approximately $19,000 of the construction loan proceeds pending resolution of the disputes. The house was eventually completed and Altaffer moved in. The dispute between defendant and Altaffer about responsibility for the alleged increased costs was submitted to arbitration. At trial defendant offered to prove that he had prevailed in the arbitration proceeding and had been awarded $24,000. This was ruled irrelevant. The trial court reasoned that under the information the crime must have occurred, if at all, within a month of July 25, 1979, and thus, subsequent events had no bearing.
Defendant adduced testimony that it is the custom in the construction industry that if loan proceeds are restricted to payment of specific costs a *935 voucher system is used. (Compare Pen. Code, § 484c with Pen. Code, § 484b.) Further, he said that under industry custom there was no restriction on the use of the progress payment save that it had to be used on the Altaffer job.
Defendant claimed that at the time he received the first draw from the Altaffer construction loan he was entitled to reimbursement from the project and that he was due more money than the loan proceeds that he had used for his own purposes. He testified that he had paid for labor and materials and provided services amounting to $34,000 prior to the time he received the Bank of America check. He furnished documents purporting to receipt for payments for labor and materials prior to July 25, 1979, aggregating $24,151.62. However, $8,500 of the receipts were supposed to be duplicates for carpenter labor in framing; these were dated July 1981. Moreover, defendant had received $4,000 from Altaffer for framing. Defendant based the rest of his claim on services he had provided to the project in lieu of subcontracting, such as surveying and installing a temporary power pole, and on overhead and payroll expenses.
The closing arguments included a protracted dialogue between defendant's counsel and the trial court concerning the defense theory of the case. Immediately before finding defendant guilty the trial court opined that it did not matter whether defendant was entitled to a credit for outlays and services provided prior to receipt of the loan proceeds. The trial court expressed the view that the loan proceeds were required to be used to defray the cost listed on the "Construction Progress Report" form. The trial court reasoned that when defendant applied the proceeds to other uses he had made a diversion within the meaning of Penal Code section 484b and thereby violated that statute.

DISCUSSION

I
(1a) Defendant contends that his conviction rests upon a misreading of Penal Code section 484b.[1] An element of the offense is wrongful diversion *936 of funds "to a use other than that for which the funds were received...." Defendant claims that use of an unrestricted construction loan draw to pay for any legitimate expense of the project is a use for which such funds are received. He argues that his conviction rests upon a contrary view of the reach of section 484b held by the trial court. The People reply that section 484b makes no allowance for reimbursement, that the trial court correctly found the proceeds from the loan were "earmarked" for use in defraying the costs listed in the application for the payment, and that in any event we must uphold the conviction on the presumption that the trial court found defendant had not made the substantial outlays he claimed. The People's latter claim must first be resolved to warrant addressing the question of interpretation posed by defendant.

A
Since there is no requirement for findings after a court trial in a criminal case, whether a conviction rests on alternative theories is ordinarily opaque. The People argue that we should indulge every favorable assumption in support of the judgment and uphold it on the theory that the trial court could have found that defendant "diverted" more than the amount of the recoupment, if any, to which he was entitled. If the trial court did so conclude, any error of law concerning the effect of a right to recoupment would not be prejudicial. The People correctly note that defendant's claim rests in major part on his own unsupported testimony and that the trial court was not constrained to accept that testimony.
(2) Generally, on appeal, statements made by the trial court in the course of trial as to its reasoning are not reviewable. (See generally 9 Witkin, Cal. Procedure (3d ed. 1985) §§ 259-261, pp. 266-269; Witkin, Cal. Criminal Procedure (1963) § 682(f), p. 666.) However, there are exceptions to this general rule. In criminal cases an appellate court may take into consideration the "`judge's statements as a whole' [when they] disclose an incorrect rather than a correct concept of the relevant law, embodied not merely in `secondary remarks' but in his basic ruling...." (People v. Ortiz (1964) 61 Cal.2d 249, 253 [37 Cal. Rptr. 891, 391 P.2d 163].) That is the case here.
There are compelling indications that the trial court did not pass on the merits of the alternate theory of conviction tendered by the People. (3) The oral opinion of the trial court may be used in interpreting the court's action in its decision of the case if it unambiguously discloses the mental processes of the trial judge in reaching his conclusion. (See People v. Megladdery (1940) 40 Cal. App.2d 748, 773 [106 P.2d 84].) After a review of the entire record and viewing the judge's discussion as a whole, we *937 believe the trial court relied upon an erroneous reading of Penal Code section 484b. That conclusion precludes the application of the contrary assumption that the court found the defendant was not entitled to recoupment. (Cf. Ortiz, supra; People v. Van Gorden (1964) 226 Cal. App.2d 634, 638 [38 Cal. Rptr. 265]; see generally People v. Cartier (1960) 54 Cal.2d 300, 312 [5 Cal. Rptr. 573, 353 P.2d 53]; but cf. People v. Grana (1934) 1 Cal.2d 565, 570-571 [36 P.2d 375], [dictum]; People v. Simmons (1971) 19 Cal. App.3d 960, 964 [97 Cal. Rptr. 283].) (4) Further, it cannot be the law that a defendant may be convicted in circumstances where the conviction appears to be based upon a legally invalid theory of the law notwithstanding the presence of an alternative valid theory. (See People v. Green (1980) 27 Cal.3d 1, 69 [164 Cal. Rptr. 1, 609 P.2d 468]; Street v. New York (1969) 394 U.S. 576, 587 [22 L.Ed.2d 572, 582, 89 S.Ct. 1354]; Stromberg v. California (1931) 283 U.S. 359 [75 L.Ed.2d 1117, 51 S.Ct. 532, 73 A.L.R. 1484].) We thus turn to the merits of defendant's contention that good faith recoupment is not a diversion.

B
(1b) The initial question is whether the Altaffer construction loan proceeds were restricted as to use. If not, payment of bills reasonably incurred on the project but not listed on the "Construction Progress Report" form is not a wrongful diversion within the meaning of section 484b. The trial court took the view that the cost items noted on the form are an exclusive list of the uses "for which the funds were received" under section 484b. This view is untenable.
(5) No term of the written contract requires that the funds be used solely to defray costs listed in the application for a progress payment. The only extrinsic evidence of the meaning of the contract is of industry custom that such funds are unrestricted so long as they are used on the job. Accordingly, construction of the contract is solely a judicial function and a question of law. (See, e.g., Parsons v. Bristol Dev. Co. (1965) 62 Cal.2d 861, 866 [44 Cal. Rptr. 767, 402 P.2d 839]; 9 Witkin, Cal. Procedure, supra, Appeal, §§ 294-295, pp. 305-306.)
(6) Construction funds are received for the use of paying for services, labor or materials on the particular construction project for which they are provided, regardless of an explicit contract term to this effect. (People v. Howard (1969) 70 Cal.2d 618, 625 [75 Cal. Rptr. 761, 451 P.2d 401].) However, in the absence of a contract requirement that a particular progress payment be allocated to particular costs we see no reason why the contractor may not apply the funds in good faith to defray the bona fide reasonable costs of the project. Under the alternative view, if the contractor uses any *938 amount of a progress payment to purchase materials for the project that were not listed in his application for the payment the contractor is guilty of a crime. For example, if the contractor purchases unlisted materials to obtain a cash discount rather than paying an unmatured debt for listed materials he would violate section 484b. The purposes of section 484b is to punish fraudulent conversion. (Id., at p. 623.) But so long as construction funds are used on bona fide costs of the project for which they are received there is no conversion.
(7a) The next inquiry is whether a contractor may recoup his prior payments for expenses and his credits for project cost items accomplished with his own resources. So long as the recoupment is made in good faith, in the absence of a contract term prohibiting such a use, there is no reason to view such conduct as forbidden by section 484b. The interest section 484b seeks to protect is the economic security provided by a direct transmutation of construction funds into project assets. Where a progress payment is applied to bona fide project costs the owner and lender receive a value in project assets presumably of equivalent value to the construction funds that have been so used.
(8) Section 484b provides a penal sanction when robbing Peter to pay Paul results in harm to Peter, i.e., a failure to complete the project or a failure to pay valid bills for material, labor, services or equipment. But the reading of the statute tendered by the People would punish the act of "robbing" Peter to pay Peter. It suffices to note that the next of section 484b does not compel this reading. The term "wrongful diversion" may reasonably be read as a diversion to a use other than bona fide project costs. Hence, we are required to read it in this manner. (9) "[A]mbiguities in penal statutes must be construed in favor of the offender...." (E.g., In re Jeanice D. (1980) 28 Cal.3d 210, 217 [168 Cal. Rptr. 455, 617 P.2d 1087].)
In view of these conclusions the trial court's declaration that it was of no moment whether defendant was entitled to a credit from the Altaffer job presents a misapplication of section 484b. (7b) If a contractor may lawfully recoup, he may use the recoupment as he likes, i.e., to purchase a Porsche or to fund another construction project. Defendant's conviction rests in part on a finding that he wrongfully diverted the progress payment to pay for the Porsche or for lumber or overhead expenses of the Boe and Raymond jobs. But if he was entitled to a recoupment in an amount greater than the amount of the funds so "diverted" he did not violate section 484b. (1c) Since the trial court held an erroneous view of the meaning of section 484b defendant's conviction is infirm.


*939 II
For the guidance of counsel and the trial court in the event of a retrial, we consider one further point that may arise. (10) The theory of the prosecution was that of People v. Worrell (1980) 107 Cal. App.3d 50 [165 Cal. Rptr. 459], i.e., that wrongful diversion alone in an offense under section 484b. Here, as discussed previously, defendant's use of the construction funds may not amount to a wrongful diversion. However, if the use was a wrongful diversion a further question arises: was the diversion a cause of failure to complete construction or failure to pay for services, labor materials, or equipment? Here the cause of failure to complete construction or to pay for project expenses might be found entirely attributable to increased construction costs arising from improper plans prepared by Altaffer's unlicensed architects.[2] If so, the conditions of penal liability set forth in section 484b have not been met. To the extent that Worrell's reasoning is to the contrary it is incorrect.[3]
Worrell commences with an analysis of Howard, supra, 70 Cal.2d 618. Worrell asserts that Howard derived as an element of the offense that there be resultant harm to the homeowner or lender from the last sentence of an earlier version of section 484b. This sentence read: "To constitute a diversion within the meaning of this section, the diversion must result in a reduction of the value of the owner's equity in his property or a reduction in the value of the security for the loan which provided such construction funds." (Stats. 1965, ch. 1145, § 1, p. 2890.) The Worrell opinion concludes that when this sentence was deleted there was no longer a requirement of harm to the homeowner and diversion alone was a violation of the statute. (Id., at pp. 5456.)
Worrell went wrong at the outset. The place to begin the process of finding the meaning of a statute is not by studying judicial glosses; first and foremost one should read the text. (See Nunez v. Superior Court (1983) 143 Cal. App.3d 476, 480 [191 Cal. Rptr. 893].) The text of section 484b says that the accused must, "willfully fail[] to complete the improvements for which funds were provided or willfully fail[] to pay for services, labor, materials or equipment provided incident to such construction, and wrongfully divert[] the funds to a use other than that for which the funds were *940 received...." (Italics added.) Given this conjunction, wrongful diversion is only one of two elements of the offense.
At this point an ambiguity arises. The use of the conjunction does not necessarily imply a causal link between the wrongful diversion and the wilful failure to complete the project. That is one semantic possibility. An ordinary usage of "and" is to condition one of two conjoined requirements by the other, thereby causally linking them. If, for example, it is said: "If you leave the gate unlatched and the dog gets out you will be punished," it likely means that no punishment attaches if the gate is left open but the dog escapes by digging a hole under the fence. A similar example arises under section 484b, for example, in the case in which a wrongful diversion is made good by the contractor but the project is not completed solely due to an unrelated cause. Such an example is not within section 484b's apparent objective to penalize the harmful effects of a wrongful diversion. Wrongful diversion without harm is not punishable as both are elements of the offense. Why then should harm unconnected to diversion warrant punishment?
Worrell implies a contrary meaning solely from the 1974 deletion of a provision of 484b which said that "To constitute a diversion ... the diversion must result in a reduction of the value of the owner's equity" or loan security. (Stats. 1965, ch. 1145, § 1, p. 2890.) Since diversion and harm are explicitly causally linked in this provision Worrell implied that its deletion was meant to dispense altogether with a requirement of consequential harm. An alternative explanation is offered in Review of Selected 1974 California Legislation, Crimes (1975) 6 Pacific L.J. 258-259, to which Worrell cites. The review suggests that the deleted provision was meant to reach the circumstance in which the contractor did construction work but, by diverting the project funds, failed to pay the subcontractors resulting in liens which "reduced" the owner's equity or impaired the security for the project loan. While accomplishing this task, the provision also conditioned the general requirement of harm, thus limiting the offense to that circumstance. This precluded prosecution where the harm caused by the diversion did not reduce the owner's equity, as, for example, where the diversion occurred before construction leading not to liens but a complete failure to commence the project. So viewed, the deletion of the condition was not meant to eliminate the causal connection between diversion and harm but to give full sway to the statutory meaning of harm as a failure to complete the project or pay for project labor and materials. We adopt this construction as consistent with the text and as properly resolving the ambiguity in favor of the defendant. (See Jeanice D., supra, 28 Cal.3d at p. 217.) We conclude that section 484b is not violated unless the wrongful diversion is a cause of the failure to complete the project or defray its expenses.
*941 One of the defenses tendered by the defendant in this case is that the project was not timely completed and project expenses were unpaid for reasons wholly attributable to the mistakes of others. If the case is retried and this defense is again offered, a conviction may only be predicated on findings of a wrongful diversion that was a cause of defendant's failure to complete the Altaffer job or his failure to pay for services, labor, materials, or equipment provided incident to the project.
The judgment is reversed.
Carr, J., and Young, J.,[*] concurred.
NOTES
[1]  At all pertinent times section 484b read as follows: "Any person who receives money for the purpose of obtaining or paying for services, labor, materials or equipment and willfully fails to apply such money for such purpose by either willfully failing to complete the improvements for which funds were provided or willfully failing to pay for services, labor, materials or equipment provided incident to such construction, and wrongfully diverts the funds to a use other than that for which the funds were received, shall be guilty of a public offense and shall be punishable by a fine not exceeding five thousand dollars ($5,000), or by imprisonment in the state prison, or in the county jail not exceeding one year, or by both such fine and such imprisonment if the amount diverted is in excess of one thousand dollars ($1,000). If the amount diverted is less than one thousand dollars ($1,000), the person shall be guilty of a misdemeanor."
[2]  With exceptions that do not appear to apply here it is a misdemeanor to practice as an architect without a license. (Bus. & Prof. Code, § 5536, subd. (a); see 6 Cal.Jur.3d, Architects, § 5.) A contract made by an unlicensed architect is illegal and void. (See Payne v. De Vaughn (1926) 77 Cal. App. 399, 404 [246 P. 1069].)
[3]  We imply no view on the holding in Worrell, namely, that there was substantial evidence to support the conviction on the facts of that case.
[*]   Assigned by the Chairperson of the Judicial Council.
