
466 S.W.2d 204 (1971)
SHAMROCK HOMEBUILDERS, INC.
v.
CHEROKEE INSURANCE COMPANY.
Supreme Court of Tennessee.
April 5, 1971.
Cunningham & Mitchell, Clarksville, for appellant.
Goodlett, Peay & Hurt, Runyon & Runyon, Clarksville, for appellee.

OPINION
McCANLESS, Justice.
The Cherokee Insurance Company, appealed to the Court of Appeals from the decree of the Chancery Court. Because all the facts had been stipulated the Court of Appeals should have transferred the case as provided by Section 16-408, T.C.A. We granted certiorari and will dispose of the case as though it had been appealed directly to the Supreme Court. State ex rel v. *205 Retail Credit Men's Association, 163 Tenn. 450, 43 S.W.2d 918.
Cherokee on March 27, 1967, issued to Shamrock Homebuilders, Inc., a builder of homes in Clarksville, a builder's risk insurance policy protecting homes then under construction and thereafter to be built by Shamrock. Among the provisions of the policy were the following which are important to the determination of this suit:
"Coverage shall cease when the interest of the Assured ceases or when the property has been accepted by the owner, purchaser, or when this policy has expired or been cancelled, whichever shall first occur."
* * * * * *
"The Insured shall as soon as practicable report in writing to the Company or its agent every loss, damage or occurrence which may give rise to a claim under this policy and shall also file with the Company or its agent within ninety (90) days from date of discovery of such loss, damage or occurrence, a detailed sworn proof of loss."
* * * * * *
"No suit, action or proceeding for the recovery of any claim under this policy shall be sustainable in any court of law or equity unless the same be commenced within twelve (12) months next after discovery by the Insured of the occurrence which gives rise to the claim, * * *"
Shamrock sued Cherokee to recover under the terms of the policy. The facts pertinent to the determination of its suit, and as they appear from the record, are these:
Shamrock negotiated a sale of a residence, then under construction, to Billy J. McGregor and his wife, Sara, and on December 19, 1967, the parties executed the documents required for the closing of the transaction; thereafter the deed and the deed of trust were filed for record. The McGregors did not get possession of the property until January 3, 1968, when they entered the house and found that water pipes had frozen and burst and that flooding had seriously damaged the house. They notified Shamrock immediately and demanded that the transaction be rescinded; however, Shamrock disclaimed responsibility for the damages and declined to cancel the trade. On April 15, 1968, the McGregors sued Shamrock in the Chancery Court at Clarksville to rescind the purchase of the property and on April 16, 1968, Shamrock notified Cherokee of the pendency of the suit and on April 23, 1968, that it was claiming under the policy for the damage to the house. On May 6, 1968, Cherokee, through its adjusters, wrote Shamrock's attorneys and denied liability on the ground that the water damage had occurred after Shamrock had conveyed it to the McGregors and, therefore, after the coverage had expired.
The Chancellor filed his opinion in the McGregors' suit on November 18, 1968, by which he found that the sale of the property by Shamrock "had not been completed." The decree was entered March 10, 1969.
On November 29, 1968that is, after the Chancellor had filed his opinionShamrock again demanded that Cherokee pay the damage in accordance with the terms of its policy. After some further correspondence, that it is not necessary to consider here, Cherokee on March 27, 1969, denied liability on the grounds (1) that Shamrock had not owned the property when the loss occurred, (2) that Shamrock had not given Cherokee notice of the loss within ninety days as required by the policy, and (3) that it had not brought suit for recovery within twelve months as also required by the policy.
Shamrock filed this suit against Cherokee on May 21, 1969, and the McGregors, claiming subrogation, intervened. Cherokee has defended on the same grounds set out in its letter of March 27, 1969, and has assigned them as error in its appeal.
We are unable to agree with Cherokee's contention that the McGregors and not Shamrock owned the property *206 when the damage occurred. The court, in the former case, in its decree found:
"Under the facts as shown by the proof, and there is no dispute on any material point, the mere fact that a deed had been executed and placed to record does not amount to a delivery so as to preclude cancellation of same, and it is clear that under the circumstances at hand, the transaction was not completed and would not have been until the Complainants, that is the purchasers, were placed in possession of the property. The seller had clearly not fulfilled its part of the obligation under the contract. The sale had not been completed."
This ground is, in effect, a collateral attack on the decree in the former case, and we cannot sustain it.
After the McGregors and Shamrock discovered the damages on January 3, 1968, there arose a serious disagreement between them as to which party had sustained the loss. Shamrock contended that the sale had been completed on December 19, 1967, and that therefore the McGregors had become the owners and must bear the loss. The parties did not resolve their disagreement and the McGregors sued. Immediately thereafter Shamrock gave notice to Cherokee. In the circumstances shown by the record the failure to give the notice within ninety days after January 3, 1968, and the delay of a few days thereafter, must be considered to be justified and that the giving of the notice on May 21, 1968, was a substantial compliance with the notice provision of the policy.
With respect to the argument that the failure of Shamrock to sue Cherokee "within twelve months next after discovery by the Insured of the occurrence which gives rise to the claim", we hold that so long as it was defending the suit of the McGregors it could not consistently sue Cherokee and in that suit claim to have been the owner of the property when the loss occurred. Shamrock's defense of the McGregor suit, though unsuccessful, was in Cherokee's interest as well as its own. A suit of Shamrock against Cherokee during the pendency of the McGregor suit would have been inconsistent. We agree that the rule of Smithart v. John Hancock Mutual Life Ins. Co., 167 Tenn. 513, 71 S.W.2d 1059, that the Chancellor quoted in his opinion, must govern this case:
"We quote from Joyce on Insurance, vol. 1, p. 588 (section 221a): `So it is declared that it is well settled that when liability has become fixed by the capital fact of loss within the range of the responsibility assumed in the contract, courts are reluctant to deprive assured of the benefit of that liability by any narrow or technical construction of the conditions and stipulations which prescribe the formal requisite by means of which this accrued right is to be made available for his indemnification.'"
* * * * * *
"It is the function of a court to interpret and enforce contracts as they are written notwithstanding they may contain terms which may be thought harsh and unjust. A court is not at liberty to make a new contract for parties who have spoken for themselves. But the parties to a contract in litigation are not to be presumed to have intended to interpose an impossible condition to its performance, wholly repugnant to the primary purpose expressed by their formal and solemn undertaking. When such result is apparently required by a literal application of the language employed, an ambiguity is developed which invokes judicial discretion. If repugnant clauses cannot be harmonized so as to give effect to both, and one is subordinate to the principal purpose and intent of the contract, a court will disregard it rather than permit it to destroy and nullify the contract."
We therefore affirm the decree of the Chancery Court and remand the cause for *207 such further action as may be required for its enforcement.
DYER, C. J., and CHATTIN, CRESON and HUMPHREYS, JJ., concur.
