
6 Kan. App. 2d 244 (1981)
627 P.2d 1147
UNIFIED SCHOOL DISTRICT No. 285, Plaintiff-Appellee,
v.
ST. PAUL FIRE AND MARINE INSURANCE COMPANY and THE HARTFORD FIRE INSURANCE COMPANY, Defendants-Appellants.
No. 51,552
Court of Appeals of Kansas.
Opinion filed May 8, 1981.
Paul H. Niewald and John L. Hayob, of Niewald, Risjord & Waldeck, of Kansas City, Missouri, for defendants-appellants.
Nelson E. Toburen, of Wilbert, Lassman, Toburen & Wachter, of Pittsburgh, for defendant-appellant St. Paul Fire and Marine Insurance Company.
Jack L. Lively, of Hall, Levy & Lively, of Coffeyville, for defendant-appellant Hartford Fire Insurance Company.
T. Richard Liebert, of Liebert & Liebert, of Coffeyville, for appellee.
Before FOTH, C.J., presiding, TERRY L. BULLOCK, District Judge, and FREDERICK WOLESLAGEL, District Judge Retired, assigned.
Petition for review denied 229 Kan. 671.
BULLOCK, J.:
A tornado struck Cedar Vale, Kansas, on June 16, 1975, and damaged a high school building and a school bus garage owned by plaintiff. The extent of that damage was the subject of this action filed against defendants, the companies which insured the buildings. The total face amount of coverage provided by defendants' policies was $251,563 for the high school building and $47,576 for the garage. After a bench trial, the trial court held that plaintiff had suffered a "total loss" and entered judgment in plaintiff's favor for the entire face amount of both policies and for interest, costs and attorney fees as well. From this judgment defendants have appealed, raising several points for our consideration.
Defendants first contend that the trial court erred in its conclusion that defendants had the burden of proof to establish that plaintiff had suffered something less than a total loss, as that term is defined by the valued policy law, K.S.A. 40-905. We concur. For many years, the law has recognized that the insured has the burden of proof to establish the nature and extent of any loss and that the loss claimed was caused by one of the perils insured against ("covered") by the policy. The only exception to this rule pertains to exclusionary clauses within the policy, with respect to which the insurer has the burden of proof. See Baugher v. *246 Hartford Fire Ins. Co., 214 Kan. 891, Syl. ¶ 5, 522 P.2d 401 (1974) and Insurance Co. v. Heckman, 64 Kan. 388, 67 Pac. 879 (1902). Based upon these authorities, we conclude that the burden of proof in this cause is on the plaintiff to prove the nature and extent of its loss, whether "total" (within the meaning of K.S.A. 40-905) or not, and that the loss was "covered" by the policy.
Defendants next contend that the record does not contain substantial competent evidence to support the trial court's finding that plaintiff suffered a "total loss" and was thus entitled to the face amount of the policies pursuant to K.S.A. 40-905. Again, we concur. The term "total loss" (or "wholly destroyed," the actual language of K.S.A. 40-905) has been consistently defined by our Supreme Court. In Insurance Co. v. Heckman, 64 Kan. at 395, the court held:
"Whether the building covered by the policy, the foundation of this action, was or was not rendered by the fire a `total loss' or `wholly destroyed,' was, in this case, a question of fact for the jury. [Citations omitted.]
"The phrase `total loss,' or its equivalent, `wholly destroyed,' as used when applied to the subject of insurance, does not contemplate the entire annihilation or extinction of the property insured. Nor does it require that any portion of the property remaining after loss shall have no value for any purpose whatever, but it means only destruction of the property insured to such extent as to deprive it of the character in which it was insured. Although some portion of the building may remain after the fire, yet if such portion cannot be reasonably used to advantage in the reconstruction of the building, or will not, for some purpose, bring more money than sufficient to remove the ruins, such building is, in contemplation of the law, a `total loss' or `wholly destroyed.' [Citations omitted.]"
In Kinzer v. Insurance Association, 88 Kan. 93, 97, 127 Pac. 762 (1912), the court quoted Heckman and added the following:
"Another case cited by appellant which recognizes the same rule is Royal Ins. Co. v. McIntyre, 90 Tex. 170, 37 S.W. 1068. There the test is said to depend upon the question `whether a reasonably prudent owner, uninsured, desiring such a structure as that in question was before the injury, would, in proceeding to restore the building to its original condition, utilize such remnant as' a basis. See also note to the same case in 59 Am. St. Rep. 811, where the author uses the following language: `Undoubtedly, no matter how great a portion of the building may remain unconsumed, yet if it is so injured that it must be torn down or that what remains can not be utilized in reconstructing the building without incurring greater expense than if it were not so utilized, the property must be regarded as having been "wholly destroyed,"' citing O'Keefe v. Ins. Co., 140 Mo. 558, 41 S.W. 922, German Ins. Co. v. Eddy, 36 Neb. 461, 54 N.W. 856, Harriman and another v. The Queen Ins. Co. of London and Liverpool, 49 Wis. 71, 5 N.W. 12, and Seyk and others v. The Millers' Nat. Ins. Co., 74 Wis. 67, 41 N.W. 443."
*247 The court slightly rephrased the rule in McKenzie v. Fidelity-Phenix Fire Ins. Co., 133 Kan. 721, 724, 3 P.2d 477 (1931), stating:
"The rule is well settled that property is not `wholly destroyed' within the meaning of the statute if an ordinarily prudent person would use any portion of the structure in the reconstruction of the building. If, however, the structure is so injured that it must be torn down or that which remains cannot be utilized in reconstructing the building, the building is `wholly destroyed.' It matters not that portions of the material in the building can be utilized in rebuilding, for it is not the material composing the building that is insured but the building itself, and if its remnant cannot be used as a basis of repair or reconstruction the loss is total. (Insurance Co. v. Heckman, supra; Kinzer v. Insurance Association, 88 Kan. 93, 127 Pac. 762, and cases there cited.)"
In the case at bar, the trial court concluded that even though there is no "literal total loss" of a structure insured as to functional use, a "constructive total loss" occurs whenever the damaged structure cannot be restored to that insured functional use for a sum equal to or less than the face amount of the policy. In this conclusion, we agree. When the functional use, or intended functional use, of an insured structure is made known to the insurer and that use is specifically described in the policy, we conclude that the repairs contemplated to be made from the proceeds of the policy, in the event of loss, are those necessary to restore the structure to that insured functional use.
Next, the trial court observed that plaintiff's buildings were twice described in the policies as "high school buildings" and "school bus garage," respectively. From this observation the trial court found that defendants had undertaken not only to insure the structures as structures, but had undertaken to insure the functional use of those structures as school and school bus garage buildings. Again, we agree.
Finally, the trial court applied this "constructive total loss" test to the facts before it and found that the damage to the structures in question was sufficiently great to "trigger" the provisions of K.S.A. 31-150, and that the cost of complying with that statute caused the loss to exceed the face amount of the policies. From the record before us, we are unable to ascertain the accuracy of this critical final conclusion of the trial court.
The statute in question, K.S.A. 31-150, as it existed at all times pertinent to this cause, requires compliance with the Uniform Building Code whenever certain types of repairs are made to school facilities. In examining the Building Code, we find that Section 104, subparts a, b, and c of that Code, provides:

*248 "(a) General. Buildings or structures to which additions, alterations, or repairs are made shall comply with all the requirements for new buildings or structures except as specifically provided in this Section.
....
"(b) Additions, Alterations, and Repairs: More than 50 Per Cent. When additions, alterations, or repairs within any 12-month period exceed 50 per cent of the value of an existing building or structure, such building or structure shall be made to conform to the requirements for new buildings or structures.
"(c) Additions, Alterations, and Repairs: 25 to 50 Per Cent. Additions, alterations, and repairs exceeding 25 per cent but not exceeding 50 per cent of the value of an existing building or structure and complying with the requirements for new buildings or structures may be made to such building or structure within any 12-month period without making the entire building or structure comply. The new construction shall conform to the requirements of this Code for a new building of like area, height, and occupancy. Such building or structure, including new additions, shall not exceed the areas and heights specified in this Code." Uniform Building Code (1970 edition).
The term "value of an existing building or structure" is defined in Section 423 of the Code as follows:
"VALUE or VALUATION of a building shall be the estimated cost to replace the building in kind, based on current replacement costs, as determined in Section 303(a)."
A careful study of these sections of the Uniform Building Code reveals that whenever school facilities are repaired and the cost of those repairs, exclusive of Code requirements, is 50 per cent or more of the amount required to totally replace the structure at current costs, the entire structure must be "brought to Code." If, however, the cost of those repairs, exclusive of Code requirements, exceeds 25 per cent but not 50 per cent of the replacement cost of the structure, only the repairs made must comply with the Code. Therefore, in order to determine whether either of these provisions of the Code are applicable to any particular school facility restoration project, it is necessary to know two facts: (1) the cost to repair the structure to its prior condition, exclusive of any costs necessitated by compliance with the Building Code, and (2) the total amount required, at current costs, to replace the structure with a new structure fully complying with the Building Code.
From these two facts the necessary mathematical calculation can be made to determine which, if either, of the subsections of the Building Code pertaining to repairs is applicable.
*249 In examining the record before us in the case at bar, we find substantial competent evidence from which the trial court could have determined the second essential fact necessary for this critical equation, that is, the total cost to replace the structures, fully complying with Code requirements. No witness at the trial, however, testified as to the cost of repairing the structures to pre-storm condition, exclusive of additional costs related to Code requirements. Without this essential fact, it cannot be determined whether either of the mentioned subsections of the Building Code are applicable and thus, the amount of plaintiff's loss cannot be accurately determined. In reaching this conclusion, we note that the difference among the amounts required (1) to simply repair the structures to pre-storm condition, (2) to repair the structures with repairs complying with the Building Code, or (3) to repair the structures, fully updating them to Code requirements, is enormous. Our review of the sketchy evidence on repair costs in the trial record tends to indicate that if the first or second option mentioned is open to plaintiff, the loss may well be something less than the face value of the policies. On the other hand, if the third option is the only one legally open to plaintiff, the cost may well exceed the face amount of the policies and thus require payment of that sum under the valued policy law, K.S.A. 40-905. For these reasons, we are persuaded that a new trial must be granted, wherein these essential facts can be established and plaintiff's ultimate loss determined.
In reaching this conclusion, we are impelled to comment upon one particular facet of the evidence before the trial court below. At the trial, the then State Architect, Louis Krueger, testified concerning a written report given by him shortly after the storm, in which report he stated:
"I am of the opinion that the damage resulting from the high winds is of such an extent that the renovation of the building would require an expenditure greater than 50% of its value and as such would require that the entire building be brought up to a standard as required by the present building code. I am of the opinion that the dollar expenditure of such a decision would far out weigh the value received when such an undertaking were completed. In other words, I do not think it is financially feasible to renovate this building to a usable condition again."
Upon examination and cross-examination, however, Krueger indicated that he had made no investigation into the current costs of either (a) repairing the structures to pre-storm condition, without *250 regard to Code requirements, or (b) totally replacing the structures, fully complying with Code requirements. He further indicated he had obtained no repair estimates and had neither prepared nor reviewed plans for repair. Krueger also testified he had made no determination of the structural integrity of plaintiff's buildings, an issue of some importance at trial, nor had he consulted structural engineers concerning it. His "opinion," baldly asserted, rested upon a brief "eyeball" inspection of the premises shortly after the storm and "long years of experience." Although considerable weight is usually given to the opinion of experts in technical matters such as the one before us, in view of the admissions of Krueger concerning what he did not do and did not know, we find his conclusions to be purely speculative in nature. Thus, we cannot conclude that his opinion, standing alone, constitutes substantial competent evidence to support the judgment rendered in this cause.
Because this cause is to be tried again, we feel constrained to comment further on one additional facet of the Krueger testimony. In weighing Krueger's opinion at trial, the trial court was apparently influenced by the fact that, under then K.S.A. 31-150, no construction or repair of school facilities could begin until Krueger, as the State Architect, had approved the plans. Based upon this circumstance, the trial court apparently concluded that plaintiff's structures could not be repaired without bringing them fully to Code because that was the opinion of the State Architect and no repairs could be lawfully made without his approval. In this conclusion of the trial court, we are bound to disagree. First, Krueger testified that plaintiff had not submitted plans for repair of the structures; that no official determination had been made by him with respect to the necessity of complying with the Building Code; and that, upon future submission, any repair plans would be carefully considered and a determination with respect to Building Code requirements then made. Second, even though Krueger was the State Architect, his authority to approve or reject proposed construction plans could not have been arbitrarily, capriciously or unreasonably withheld. Accordingly, we conclude that the preliminary opinion of the State Architect was not determinative of the issue before the trial court and, on retrial, should not be thus considered.
Two final issues raised in this appeal deserve attention. Defendants *251 argued before the trial court and in their briefs to this court that their liability should not include any costs necessitated by compliance with the Uniform Building Code, should that be required under the facts ultimately determined, for the reason that the terms of the policies exclude coverage for such costs. In this connection, we observe that the policies before us insure plaintiff "to the extent of the actual cash value of the property at the time of loss, but not exceeding the amount which it would cost to repair or replace the property with material of like kind and quality within a reasonable time after such loss, without allowance for any increased cost of repair or reconstruction by reason of any ordinance or law regulating construction or repair." (Emphasis added.) Likewise, in the replacement cost endorsements affixed to these policies, we find the following, which is said to be substituted for the words "actual cash value" in the insuring clause quoted above:
"3. This Company shall not be liable under this endorsement for any loss 
(a) Occasioned by enforcement of any local or state ordinance or law regulating the construction, repair or demolition of buildings unless such liability has been specifically assumed under this policy."
The trial court found that these provisions did not constitute limitations of the defendants' liability for two reasons: (1) defendants insured the functional use of the buildings in question as school facilities, which are, by definition, subject to the Building Code, and thus, contractually assumed Building Code cost liability in the replacement cost endorsements by virtue of the quoted policy phrase: "such liability has been specifically assumed under this policy" and, or alternatively; (2) limitations of liability in policies of insurance, such as those under consideration, are void and unenforceable as against public policy inasmuch as those limitations conflict with statutory requirements applicable to the insured's structures which were known, or should have been known, to the defendants at the time the policies were written.
At the time of the oral argument before this court, defendants tacitly conceded that the view of the trial court with respect to these contended limitations of liability was correct when they indicated they did not "seriously argue" to the contrary. We agree. The notion that ambiguities in written contracts are construed against the author is so ancient a maxim of contract law as *252 to require no citation of authority. Accordingly, if it be assumed that the replacement cost endorsement is inconsistent with the insuring clause of the policies in question, thus creating an ambiguity, that ambiguity must be construed against those who prepared the documents, the defendants. The obvious result of any such construction is the inescapable conclusion that defendants, having contractually undertaken to insure plaintiff's structures as school facilities, facilities known to be subject to the Building Code, have also assumed liability for the costs of complying with that Code upon loss. Thus, defendants are liable, up to the limits of coverage, for the cost of plaintiff's necessary repairs, including any added costs in making those repairs occasioned by Code requirements.
Turning to the trial court's second reason for rejecting defendant's argument, we find that the authorities dealing with the enforceability of attempted limitations of liability concerning building code or similar governmental requirements are comprehensively collected in an annotation at 90 A.L.R.2d 790. Although these authorities are somewhat divided, we find that those holding such limitations unenforceable are the more persuasive. See, especially, Stahlberg v. Travelers Indem. Co., 568 S.W.2d 79 (Mo. App. 1978).
Finally, defendants contend the trial court incorrectly applied the terms of the replacement endorsement in the case at bar. Once again, we concur. The primary insuring provisions of the policies before us provide for payment to the insured, in the event of loss, of an amount equal to the "actual cash value" of the loss. Although this term is not defined in the policy and we find no Kansas cases defining the same, we are persuaded that this term means cost of repair or replacement, less applicable depreciation. See Lerer Realty Corp. v. MFB Mutual Insurance Co., 474 F.2d 410 (5th Cir.1973).
The replacement cost endorsement affixed to the policies purchased by plaintiff in this cause indicate that the insurer will pay the actual cost of repair or replacement, rather than the depreciated value of that which was damaged, but only if plaintiff actually repairs or replaces the structures. Specifically, the endorsement provides:
"This Company shall not be liable under this endorsement for any loss ... unless and until the damaged property is actually repaired or *253 replaced by the Insured, on the same premises and with due diligence and dispatch."
We find that this provision is clear and unambiguous and requires actual repair or replacement as a condition precedent to the insurer's liability for the additional coverage provided by the endorsement. In the case at bar, the trial court held that plaintiff could recover the actual cost of repairs without regard to depreciation, even though plaintiff elected not to replace, repair or restore the structures. In reaching this conclusion, the trial court noted that the policies in question, in other provisions, granted to the insurer, in the event of loss, the option to make repairs on its own initiative in lieu of merely reimbursing the insured for the repairs made by the insured. Inasmuch as the defendants here elected not to undertake repairs on their own initiative, the trial court determined they had waived actual restoration as a condition precedent to liability for added benefits under the replacement cost endorsement. We do not agree. These provisions of the policies are entirely separate and distinct and we conclude that the election of the defendants not to undertake repairs on their own initiative was unrelated to and did not operate as a waiver of the actual restoration requirement of the policy, which is a condition precedent to liability under the replacement cost endorsement. See Kolls v. Aetna Casualty and Surety Company, 378 F. Supp. 392 (S.D. Iowa), aff'd 503 F.2d 569 (8th Cir.1974).
In view of the substantial bona fide issues presented in this cause, we likewise find the award of attorney fees to plaintiff below unwarranted. On retrial, each party should bear its own costs of litigation. For all of the reasons set forth above, this cause is reversed and remanded for a new trial consistent with the views expressed in this opinion.
Reversed and remanded.
