opinion: DAVIS, Circuit Judge.
  This is an appeal from a judgment of the District Court entered upon the verdict of a jury.
  The defendant issued its policy of insurance on the dwelling house of the plaintiff, McHose, for $3,500 on which the premium of $50.75 was paid. The policy was issued on January 4, 1927. A fire occurred on February 18, 1930, which destroyed the building to the extent that it could not possibly be occupied.
  The parties then entered into negotiations for adjustment of the loss in accordance with the provisions of the policy. The insurance company, through its adjusters, notified the plaintiff to select an appraiser to ascertain the loss, and directed him to protect the property against further loss, but to let it remain in the same condition in which the fire had left it, for the reason that the company had thé right to repair, rebuild, or pay the loss. In obedience to this request, the plaintiff boarded up the building. Efforts were made tb effect an appraisement and reach a settlement, but without success. While'these negotiations were going on, that part of the building not destroyed by the previous fire, caught on fire on June 1, 1930, and was totally destroyed/
  ■ The defendant denied liability for the loss caused by the second fire because the house had been unoccupied for more than forty consecutive days following the first fire, when the second fire occurred. That section of the policy which the company says exempts it from liability provides that, “this Company shall not be liable for loss or. damage occurring * * * while a described building, whether intended for occupancy by owner or tenant, is vacant or unoccupied beyond a period of ten days,” extended by another section of the policy to forty days. Thereupon the plaintiff brought this suit for the loss sustained in both the first and second fires. The company, however, admits liability for the' loss caused by the first fire only;:
  The learned trial judge submitted the case to the jury on the theory that notwithstanding the vacancy of the building between February 18, 1930, and June 1, 1930, the jury might consider the question of damages resulting from the loss from the second fire, and further, that it might consider whether or not under the facts of this ease, the defendant had not waived the provision of the policy as to occupancy.
  There appear to be only three reported cases in the United States on this particular subject. The one supporting the position of the defendant is Kupfersmith v. Delaware Insurance Company, 84 N. J. Law, 271, 273, 86 A. 399, 400, 45 L. R. A. (N. S.) 847, Ann. Cas. 1914C, 1172. In that case the policy provided that it “shall be void if the * * * building herein described, whether intended for occupancy by owner or tenant, be or become vacant or unoccupied and so remains for ten days.” There the building was urn occupied between October 15, 1908, date of the first fire, and February 16, 1909, date of the second fire. This fact was pleaded as a bar to the action. The plaintiff contended that the provision relating to vacancy was suspended by the first fire, because the first fire rendered the building uninhabitable and the company had the option to repair, rebuild, or replace the property lost within a reasonable time after receiving proof of loss, on giving notice of its intention to do so; and further because the insured was required to permit the property to remain in the condition in which the fire left it until after the company exercised its option, that is, allow it' to remain unoccupied while it was uninhabitable. The cases supporting the plaintiff’s contention in that ease axe Lancashire Insurance Company v. Bush, 60 Neb. 116, 82 N. W. 313, 314, and Schmidt v. Williamsburgh City Fire Insurance Co., 98 Neb. 61, 151 N. W. 920.
  In the Bush Case the court said: “The plaintiffs could not have made the building habitable without trenching on the insurer’s rights. They were not responsible for the fact that the property was vacant. But, aside from this consideration, we think it very clear that there was no forfeiture under the clause above quoted. It could not have been contemplated by the parties that the building should be occupied when, as a result of its partial destruction by fire, it became unfit for occupancy. If the company was dissatisfied with the risk after July 31st [the date of the first fire], its remedy was by a cancellation of its contract.”
  Chief Justice Gummere, speaking for the Court of Errors and Appeals of New Jersey, in the Kupfersmith Case, refused to follow the doctrine declared in the Nebraska cases for the reason that they “seemed to inject into the contract of insurance provisions which materially alter the written instrument, and which were not agreed to by the parties.” He said: “There is no suggestion in this language that the provision shall be applicable only when the insured voluntarily leaves the premises unoccupied for the specified period. It is the fact of vacancy, not its cause, which makes the provision operative. Nor does it seem to us material, in considering this provision, that it could not have been contemplated by the parties that the building should be occupied when, as a result of its partial destruction by fire, it became unfit for habitation. It may readily be conceived that the parties contemplated that many conditions might arise which would necessarily render the building uninhabitable for a period exceeding the ten day limit; but what they provided by their contract was that whenever any such condition should arise, and as a consequence thereof the building should become vacant and remain unoccupied for a period longer than that designated, the risk of its injury or destruction by fire should cease to be borne by the company. That the parties had a right to so contract cannot be denied; that they intended so to contract seems to ns to be equally clear.”
  It is true that the parties had the right to make any kind of contract that they desired to make. The court may not inject anything into a contract which it does not include either expressly or by necessary implication, and in construing a contract, the court cannot make a better one for either party than they themselves have made. As Chief Justice Gummere said, “the judicial function of a court of law is to enforce a contract as it is written.” It is true that “the law will not insert, for the benefit of one of the parties, by construction, an exception which the parties Jiave not, either by design or neglect, inserted in their engagement.” Superintendent, etc., of Public School of City of Trenton v. Bennett, 27 N. J. Law, 513, 72 Am. Dec. 373; Middlesex Water Company v. Knappmann Whiting Company, 64 N. J. Law, 210, 45 A. 693, 49 L. R. A. 572, 81 Am. St. Rep. 467.
  But the rule of law everywhere recognized is that a contract includes not only what is expressly stated, but also what is necessarily implied from the language used. Terms or provisions which may clearly be implied from a consideration of the entire contract are as much a part of it as though they were expressly incorporated in it. Implication of an unexpressed provision must arise from the language used in the instrument or ho indispensable to effectuate the intention of the parties. Wildman Manufacturing Company v. Adams Top Cutting Machine Co., 149 F. 201 (C. C. A. 3); E. I. Du Pont de Nemours Powder Company v. Schlottman, 218 F. 353 (C. C. A. 2); 13 Corpus Juris, § 521, and the eases there cited.
  The question arises here as to whether or not the language of this contract of insurance providing that the company would not be liable for loss or damage if the building was vacant or unoccupied beyond a period of forty days indicates that it was the intention of the parties that the building should and would be inhabitable and could be occupied during that period. It is unreasonable and self-contradictory to provide that a building must be occupied during a period when the parties knew that it could not be occupied. It is unthinkable that they knowingly and intentionally provided that one of them should do an impossible thing, occupy an unoecupiable building, in order to protect the insured against loss from fire. What they had in mind was that the building as then existing in an oceupiable condition should not be left vacant or unoccupied, and thus subjected to greater risks for a period exceeding forty days without written permission so to do.
  Under the section of “Privileges Granted” in the policy here involved, it is provided that a building may bo “vacant for a period not exceeding thirty (30) days in any one policy year in addition to the vacancy privilege of ten (10) days provided for under the printed conditions of this policy.” The policy contains a like provision for unoecnpancy.
  One of the printed conditions referred to above, is that: “Unless otherwise provided by agreement in writing added hereto, this Company shall not be liable for loss or damage occurring * * * while a described building, whether intended for occupancy by owner or tenant, is vacant or unoccupied beyond a period of ten days.”
  What it meant by “agreement in writing” is the customary practice everywhere followed of attaching a written permit issued by the company to the policy, providing that the building may remain vacant or unoccupied for a longer period than that specified in the policy. If such written agreement or permit is not secured, vacancy or unoecupancy of an oceupiable building for a longer period renders the policy void. It was this practice to which the provision of the policy was addressed. The insured evidently did not have in mind the fact that an unoeeupiablo building must nevertheless be occupied in order to hold the company liable under its policy. If the company had it in mind it nowhere appears in the policy either expressly or by necessary implication. If it had had such fact in mind, it most likely would have been expressly included in its exceptions. We do not think that the provision as to vacancy was intended to cover or did cover an unoecupiable building. Consequently, the insured did not breach the vacancy or unoeeupancy clause, and the loss caused by the second fire is not barred by the provision here invoked. The Nebraska eases so hold, and Cooley in his Briefs on Insurance, vol. 3, p. 2588, says: “But after a partial loss under a fire policy, which renders the building untenantable, the insured is not guilty of a breach of the vacancy clause of the contract, where he permits the property to remain unoccupied pending the period during which the insurer is authorized to exercise its option to repair the damaged^ building.”
  Joyce on Insurance, vol. 4, § 2235, takes the same position. Corpus Juris states this to be the law, notwithstanding the Kupfersmith Case, which it cites as contrary. 26 Corpus Juris, 217.
  The appellant further says that the court erred, first, in admitting evidence tending to show waiver by oral agreement on the part of the defendant company, and in submitting that question to the jury, and, second, in submitting the question to the jury of whether or not the premises were uninhabitable with the instruction, that if they were, this constituted a waiver.
  Under the view which we have taken of the vacancy and unoccupancy clause, the submission of the question of waiver to the jury was immaterial and harmless.
  Under the instruction of the court, the jury must have found that the premises were not oecupiable when the second fire occurred, and this being established, under the undisputed facts, the defendant company is liable for the second fire as well as the first, and so the judgment is affirmed.