McCauley, J.The plaintiff in the court below, deposited his oil with the defendant upon a definite agreement as to the rate to be allowed for evaporation, and upon certain rates to be charged by the defendant for storage. These rates are set up by the answer which was demurred to, and is therefore admitted. If they were not admitted, the receipts for storage given in evidence by the plaintiff show the agreement of storage to be as alleged in the answer.
These receipts make the company liable to re-deliver the oil, on compliance by the depositor with the conditions *387upon which the oil was to be re-delivered. If the company-failed or refused to re-deliver the oil on demand, and upon compliance by the depositor with the conditions upon which it was deposited, it became liable for the value of the oil subject to the charges for storage and allowance for evaporation. When the plaintiff brought his action for the non-delivery of the oil, he sought to enforce the agreement of storage so far as it was binding upon the defendant, and when the defendant set up as a defense the terms and conditions upon which it was liable tó re-deliver the oil, it set up the terms of the same agreement, so far as they were binding upon the plaintiff. The pleadings, therefore, on both sides set up the matters of agreement between the parties. The reason urged by the defendant in error why the matters alleged in the answer were not proper matter of defense was, that the action was trover, and in such an action matter of contract could not be alleged as counter claim. The petition alleges that the defendant wrongfully and unlawfully converted the oil to' its use. This language seems to have been used to turn the case from one upon contract to one of tort, and thereby to exclude set-off or counter claim; but when the answer alleges the agreements of the parties in reference to the subject matter of the action, the wrongful or unlawful conversion of the oil becomes of no consequence, and the action becomes one in which the rights of the parties are to be determined by their agreements concerning the subject matter in controversy between them. The dealings of the parties about the oil, admitted by the demurrer, show that while the company was liable to account for the oil, whatever liability attached to the plaintiff by reason of such dealings was a. proper counter claim, or at least to the extent of the plaintiff’s claim for the value of the oil, because it was a claim connected with the subject of the action. The cburt therefore erred in sustaining the demurrer to the answer.
Upon the trial, however, the receipts of storage were given in evidence by the plaintiff. These receipts showed, as before stated, what the agreements of the parties were *388about the oil, and the court instructed the jury to consider the receipts. This action of the court turned the action, at last, from one of tort to one of contract. But the jury were instructed that the rule of damages, in case the plaintiff was entitled to recover; would be the value of the oil at the time of the conversion, less such deductions as should be made for reasonable charges and any advances made by the defendant, and also reasonable deductions for evaporation. In thus instructing the jury the court was clearly in error.
If the receipts were properly in evidence, and their terms were binding upon the parties, they furnished the rule of liability between them, and the instruction that the jury might allow reasonable' charges and reasonable allowance for evaporation was,-in effect, to make a new contract between the parties instead of enforcing the agreement they themselves made. Instead of reasonable "allowances and reasonable charges, the defendant was entitled to the actual allowances and actual charges agreed upon in the receipts of storage to an amount equal to the claim of the plaintiff.
Judgment reversed.