Corson, J.
This is an action in claim and delivery to recover the possession oí a certain threshing outfit, consisting of a steam engine, separator etc., and certain other personal property, under and by virtue of a chattel mortgage given by the defendant to 'secure two certain promissory notes aggregating the sum of $450 and interest. The defendant answered, admitting the execution and delivery of the two notes and chattel mortgage and pleaded by way of counterclaim, in effect, as follows: That on or about the 20th day of February, 1896, the plaintiff, by its agent, demanded and ordered of defendant that he insure the threshing engine and outfit described in plaintiffs complaint, in the sum of $1,000, as additional security to the said company for the indebtedness due from the defendant; that at said time the plaintiff, by its agent, took the defendant’s application for insurance, and agreed that, if the company could not at once and immediately place the same, it would carry the risk itself; that relying upon and placing confidence in, the representations and agreement so made, the defendant on the 20th day of February, 1896, made application for said insurance on the said property in the sum of $1,000; that in payment for said insurance the defendant executed and delivered to the plaintiff his promissory note, payable on the 1st day of October, 1896, for the sum of $22, as premium; that on the 13th day of May, 1896, the said property was damaged and injured by fire to the amount of $515; that immediately thereafter the defendant notified the plaintiff of said loss, and requested payment of said damage; that the plaintiff refused and still refuses, to pay the same; that at the time of the said fire, and for a short time thereafter, plaintiff was in the possession of, and own,er of said promissory note given for the payment of *283said insurance, and had been in the possession of, and owner of, the same since the day of its execution; that the plaintiff failed and neglected to insure said property in some reliable insurance company, but gave this defendant no notice of failure to insure the same until after the fire occurred, and the plaintiff had actual knowledge thereof, and by reason of the breach of the said contract by the plaintiff, and the loss thereby occurring to the defendant, the defendant has been damaged in the sum of §515, and the plaintiff is indebted to the defendant therefor. Wherefore defendant demanded judgment against the plaintiff for the balance due him. To this counterclaim the plaintiff interposed a demurrer upon the ground that the same did not state facts sufficient to constitute a defense to the said action. The demurrer was overruled by the court, and to the order overruling the same the plaintiff excepted. The case was tried by the court, sitting with a jury, and a verdict was rendered in favor of the defendant for the possession of the property and costs; and from the judgment entered thereon, and the order denying a new trial, the plaintiff has appealed.
The objection that the answer by way of counterclaim did not state facts sufficient to constitute a counterclaim was taken in several forms during the trial. The appellant contends that, if there was any liability on its part, it was not upon any contract to insure the property, or to pay the damage in case of loss, but that its only liability, if any, was for its failure to have the insurance written, and that this would be a liability based upon a tort, and could not be counterclaimed against appellant’s claim in this action, which was based upon a contract; and particularly so as the action is one in-claim and delivery. Respondent, on the other hand, contends that the defendant’s *284cause of action arose out of the contract or transaction set forth in plaintiff’s complaint as the foundation of its claim, and is connected with the subject of the action. Section 4915, Comp. Laws, provides that: “The counterclaim * * * must be one * * * arising out of one of the following causes of action: (1) A cause of action arising out of the contract or transaction set forth in the complaint as the foundation of the plaintiff’s claim or connected with the subject of the action.” It will be observed, from the counterclaim set up in this case, that, the defendant being indebted to the plaintiff on two promissory notes secured by a chattel mortgage on the property mentioned in the complaint, the plaintiff, through its agent, required the defendant to have the property included in the said mortgage insured, and agreed that, in case it could not procure the insurance for the defendant, ■ it would assume the. risk itself, and that thereupon the defendant signed a formal application to the plaintiff for $1,000 insurance, and executed and delivered to the plaintiff its premium note for the sum of $22 in payment for the same. We are of the opinion that the counterclaim did arise out of the transaction set forth in the complaint as the foundation of the plaintiff’s claim, or at least that it is connected with the subject of the action. The provisions of this section in regard to counterclaims have given rise to a contrariety of opinions, and no definite or fixed rule seems to have been laid down by courts or text writers as to the construction to be placed upon the same. In McHard v. Williams, 8 S. D. 381, 66 N. W. 930, this court said: “One of the more important purposes of the adoption of the code system of pleading was to avoid, as far as possible, a multiplicity of suits, and to enable parties to determine their differences in one *285action. And to this end counterclaims were designed, not only to include recoupment and set-offs at common law, but to enlarge their scope, so that but few cases could arise in which all litigation between the parties to the action might not be settled in the same suit.” But as was said in Carpenter v. Insurance Co., 93 N. Y. 552: “The counterclaim must have such a relation to and connection with the subject of the action that it will be just and equitable that the controversy between the parties as to the matters alleged in the complaint and in the counterclaim should be settled in one action by one litigation, and that the claim of the one should be off-set against, or applied upon, the claim of the other.” In the case at bar, if the plaintiff had become liable to the defendant for the amount of his loss, it would be but equitable and just that that amount should be applied in the extinguishment of the defendant’s notes; and it would be manifestly UDjust to permit the plaintiff to recover possession of the property claimed, while, by reason of its indebtedness to the defendant, the debt of the defendant was in law extinguished, and its lien upon the property in effect canceled. It was by reason of the fact that the defendant was indebted to the plaintiff that he was required to procure this insurance, for the purpose of increasing the plaintiff’s security for that indebtedness. The counterclaim of the defendant, therefore arose directly out of the transaction, and was connected with the subject of the action. The subject of the action was evidently the recovery of the personal property described in the complaint and mortgage. It was this identical property that the defendant contracted with the plaintiff to have insured. It was a breach of this contract for which the defendant sought to recover damages. The failure of the plaintiff to secure the *286insurance did not constitute a tort, but, under the terms of the contract, as alleged, the plaintiff became liable for the loss itself. Hence the contention of the appellant that the counterclaim was in the nature of a tort, that could not be pleaded as against a claim on a contract, is not tenable.
It is further contended on the part of the appellant that the motion for the direction of the verdict should have been granted for the following reasons: “(1) There is no evidence showing that the appellant expressly agreed to procure insurance for the respondent, or failed to procure said insurance through its fault or neglect. (2) There is no evidence tending to show that the appellant agreed to carry the insurance itself incase it could not have the policy written by an insurance company, no evidence having been introduced under this allegation of the answer. (3) The undisputed evidence of the appellant’s witness Bushnell shows that the company exercised due diligence in attempting to procure the insui’ance applied for, and was unable to do so, through no fault of the appellant, but for the reason that no company could be found which would write this class of insurance.” The only evidence upon this subject-was that of the defendant, Darnall, who testified as follows: “The business transactions I had with the company were in the summer of ’9-f or ’95. I purchased a separator from them, with feeder and attachment. I have heard the testimony of the plaintiff as to these notes. They were given for the purchase of this machine. About the 20th of February, 1896, the company’s collector called on me at my place, and wanted me to pay the note that was due at that time, and I could not. He said that, if I couldn’t pay, I would have to renew and give additional security; and after we had the papers drawn up he *287said tbe company required me to make an application for insurance for §1,000, and [ made application for insurance. Exhibit B is the application for insurance which I signed at that time. * * * j delivered the application to Mr. Hendricks at the time it was written, and gave a note in payment for the premium. The note was for $22, and was delivered with the application to Mr. Hendricks. Nothing more took place at the lime the application was made, except that the agent explained how the insurance worked. I think that the next step of any importance was on the 14th of May. I wrote a letter to the company. At the time the application for insurance was taken out, Mr. Hendricks requested the insurance for the purpose of further securing the indebtedness. * * * On the 18th of May, 1896, a fire occurred from some cause, and on the 14th I notified them. The building that the engine was stored in, and the rest of the machinery were consumed by fire. I got no reply direct from the company at the time the application for insurance was made. * * * At the time the application was given I also gave the company a note, which I next saw the last of May. Mr. Hendricks came with the note and application about two weeks after the fire. At the time of the fire I had received no notice in regard to the insurance, nor any correspondence about it. Tbe first I heard from the company after they had ta.ken the application was the 15th or 16th of May. I received a letter from them in which they stated that they had not been able to insure,the rig as yet, as the company had raised their rates. They were still trying to find a company to take it at the old figure, and if they could ihey would immediately place it; if not, they would return the note which I had given them. I next saw the application about the last of May. The applica*288tion and note were returned to me at that time by Mr. Hendricks.” This request was upon a printed blank headed, “Application for Insurance on Threshing Rigs,” and commenced as follows: “To the Minneapolis Threshing Machine Co., Minneapolis, Minn.' — Gentlemen: Please procure insurance for the undersigned” on engine, etc. There was also on the back of the blank application printed directions to the agents of the appellant, concluding as follows: “The policies will be written in the name of the purchaser, with the loss, if any, payable to theMiuneapolis Threshing-Machine Company, as their interest may appear; and the policies, if you are owing us for the machinery, will be held by us as security for the debt. The insurance is written up with reliable fire insurance companies doing business through their regular agents in Minneapolis, and our interest in it is to secure reliable insurance, and to partially protect ourselves by additional security from those owning our machines. Fill out and mail us the application on the back of this sheet, together with draft to pay for the insurance, or, if unable to pay all of the money now, send two dollars cash, and the balance note payable to our order in 30 days with 8 per cent interest.” It will thus be seen that, as contended by appellant, there was no evidence on the part of the defendant that the appellant agreed, in terms, to procure insurance, or that in case it could not procure the same it would assume the risk. But we are of the opinion that the motion to direct the verdict was properly denied, as the question of whether or not there was an implied contract to procure the insurance, and whether or not the appellant used due diligence in attempting to procure insurance, and was or was not guilty of negligence in failing to notify the defendant of its inability to procure the same, were proper questions for the jury.
*289It is further contended on the part of the appellant that as it appears from the undisputed evidence that the appellant used due diligence in endeavoring to procure insurance for the defendant, and failed to procure the same for the reason that no company could be found to accept such risks, the court should have sustained the motion made by the appellant a+- the close of all the evidence for a direction of a verdict in its favor. But we are inclined to take the view that these presented questions of fact to be submitted to the jury. It is true that the secretary of the appellant testified that he made efforts to procure insurance for the defendant, giving somewhat in detail the efforts that he had made; but the court could not say, as matter of law, that the appellant used all the diligence required to secure such insurance. It was for the jury to say, upon all the evidence, whether or not the appellant had used due diligence, or had been guilty of negligence by reason of its failure to notify the defendant of its inability to procure such insurance within a reasonable time.
It is further contended by the appellant that it was error for the court to refuse to direct a verdict for appellant upon the ground that when the loss occurred the property was being used at a time and in a manner and at a hazard which would not have been covered by the policy of insurance provided for in the application, had any been issued. It appears from the application that the appellant was requested to procure insurance on the engine for §500, •while not in use, and located in sheds on S. E. section 35, township 115, range 52, Hamlin county, S. D., and also for a threshing permit while in use in the counties of Hamlin and Deuc4 for the term of three months from August 20, 1896. It appears from the evidence in the *290case that the engine was not stored at the time of the fire, but was contained in a feed mill, where it had been used for power for running the mill prior to and within a few days of the fire: The application undoubtedly contemplated that the engine was not to be used for nine months of the year, but wTas to remain in store during the time when not in use for threshing purposes. Whether or not, therefore, its use in the feed mill would have increased the hazard, and rendered void any policy that might ■have been issued in accordance with the terms of the application, was a question of fact for the jury.
It is further contended on the part of the appellant that the respondent was not entitled to recover the valne of the self-feeder, as that was not insured specifically, and was not part of the threshing outfit. But we are of the opinion that under the evidence it was properly treated by the court as a part of the outfit. It is true, the feeder was sometimes used with the outfit, and at other times was not used. But as it clearly appears from the evidence of the respondent that the separator would not have been of the value mentioned without the self-' feeder, and that he regarded the feeder as a part of the outfit, we see no error in the court’s holding that in this case it did constitute a part of the outfit.
The appellant further claims that the court erred in its instructions to the jury, by assuming that certain facts bad been proven in the case, as to which there really was no evidence. But, upon an examination of the instructions, we fail to find any error of the nature claimed, and the facts apparently stated by the court as proven in the case were simply stated as the facts claimed to exist on the part of the respective parties. We are of the opinion that the issues in the case were fairly submitted to the jury.
*291It is further claimed on the part of the appellant that the court erred in permitting the respondent to amend his answer so as to include interest, but as the amendment did not materially change the issues, and was a matter largely in the discretion of the court, we find no error in its allowance. Finding no error in the record, the judgment of the court below, and the order denying a new trial, are affirmed.