The opinion of the court was delivered by
JOHNSTON, C. J.:This was an action by the appellee, Sherman Culbertson, for an accounting and to recover from the appellants, the Iola Portland Cement Company and L. L. Northrup, for the gas obtained and used by them from the lands of appellee under a lease executed by the grantor of the appellee to the grantor of the appellants in 1902. There were the usual stipulations in the lease as to the development of the land for oil and gas, and also one that “should gas be found on said premises of a minimum capacity of 3,000,000 cubic feet per well, daily, second party agrees to pay to first parties Fifty Dollars annually, for every well from which gas is used' off the premises; also' one-eighth of all money (net) received from the sale of said gas or from the sale of said well or wells.” Operations *531under the lease were begun within the prescribed time and three wells were drilled in 1902. In two of them gas was found and one of them proved to be a dry hole. It was alleged that gas was taken by appellants from the producing wells without paying for the same, and also that gas was taken from appellee’s land through wells which were drilled by them on lands adjoining that of appellee. It is alleged that there was a general pool of gas there and that appellants had drilled wells on the adjoining land and through them had extracted the gas' from under appellee’s land, the amount of which appellee was unable to state, but that by both means appellants had taken each day more than 3,000,-000 cubic feet and that it was worth three cents per thousand cubic feet.
When the case was called the court determined that it was a proper case for reference, and a referee was appointed who was directed to make findings of fact and conclusions of law. A trial was had before the-referee and upon the testimony he found that a large-quantity of gas had been taken from appellee’s land which had been piped by appellants to their cement factory in Iola and there used for manufacturing purposes ; that the value of the gas so taken and used was-two cents per thousand cubic feet, and that so reckoned appellee was entitled tp a judgment for $2252.47. The court approved the findings and rendered judgment-against the appellants for the amount so found.
Appellants assumed that the petition of appellee stated more than one cause of action and complain that-the court refused to require him to separately state them. There was but one cause of action and that was for an accounting of all the gas obtained and piped from appéllee’s land, whether it was obtained from wells drilled on the land or from those drilled on adjoining land. The. fact that gas was taken by both means was no reason for setting out the indebtedness *532in two counts, nor did the fact that some of it was wrongfully taken require the bringing of two actions to recover the value of all the gas appropriated by appellants.
Appellants insist that they were entitled to a jury trial, but the action was for an accounting and it appears that an examination of long accounts of the gas taken by the different methods was necessary. It was peculiarly a case for reference. (Civ. Code, § 299.)
Complaint is made of an order of the court permitting appellee to inspect and take measurements of the capacity of a certain gas well upon condition that twenty-four hours’ written notice be given appellants of the time when the inspection would be made. It was also provided that the appellants were to be represented by their officers or agents during the inspection and measurement of the well, and they were directed to render to appellee full and free facilities to open, inspect, and take measurements of the well so as to ascertain its capacity as a gas-producing well. It is contended that there was no authority for ordering or making such an inspection and that those acting under it would, in fact, be committing a trespass. There is no specific statutory authority for the order but such orders have been made by courts of equity from the beginning. It may be done where there is a .real necessity for inspection or where the facts to be determined can not well be determined by the ordinary methods. A statute authorizing it was upheld in Montana Company v. St. Louis Mining &c. Co., 152 U. S. 160, and it was held and cases were cited showing that the right to make such an order was an inherent power of a court of equity which could be exercised independently of any statute and that this power had never been denied. In making the contention that it was a trespass and an illegal interference with a man’s absolute control of his own property it was held that the *533necessities of justice warranted the inspection, .and it was said that:
“To ‘establish justice’ is one of the objects of all social organizations, as well as one of the declared purposes of the Federal Constitution, and if, to determine the exact measure of the rights of parties it is necessary that a temporary invasion of possession of either for purposes of inspection be had, surely the lesser evil of a temporary invasion of one’s possession should yield to the higher good of establishing justice.” (p. 169.)
Inspection is frequently ordered in mining cases but the power is exercised to assist in determining the value of buildings and to ascertain other essential facts. (Lewis v. Marsh, [Eng.] 8 Hare’s Ch. 97; Thomas Iron Co. v. Allentown Mining Co. and Henry Baker, 28 N. J. Eq. 77; Stockbridge Iron Company v. Cone Iron Works, 102 Mass. 80; Thornburgh v. Savage Mining Co., 7 Morrison Min. Rep. 667; State, ex rel. P. S. & C. Co. v. Dist. Ct., 28 Mont. 528, 73 Pac. 230; Bennett v. Griffiths, [Eng.] Part 2, 30 L. J., n. s., 98; Kynaston v. The East India Company, [Eng.] 3 Swanst. 248; State, Hudson Co. Land Imp. Co. et al., pros., v. Seymour et al., Com’rs, 35 N. J. Law, 47; Winslow v. Gifford & others, 60 Mass. 327; 27 Cyc. 669.)
In interpreting an act authorizing an injunction restraining persons from mining on the land of another and authorizing a survey to ascertain the facts in relation thereto, it was held that a survey of a mine which extended outside of the state was invalid, but it was .stated that without a statute courts had authorized inspection of mines on neighboring lands in which the plaintiff had no interest. (In re Carr, Petitioner, 52 Kan. 688, 35 Pac. 818.) No error was committed in granting the order of inspection.
The sufficiency of the evidence is attacked by appellants, and it is contended that under the terms of the lease no liability arose for the gas taken by ap*534pellants. It provided that if gas was found in any well of a minimum capacity of 3,000,000 cubic feet, daily, a certain rental per well should be paid and also a certain royalty on all the gas sold from the premises. The contention is that the evidence did not show a particular well to be of the minimum capacity. On this question considerable testimony was taken, some of it expert in character, which supported the finding of the referee that the two producing wells were each of a capacity that exceeded 3,000,000 cubic feet of gas per day. This was shown by the testimony of persons acquainted with the field and who were experienced in the mining of gas. It is conceded that absolute accuracy of measurement could- not be attained, but, taking the situation as it was, it appears that the best evidence obtainable was produced, and it further appears to have been sufficiently definite and reliable to warrant the findings made. This provision in the lease fixing the minimum capacity of the wells drilled on appellee’s land evidently was intended to impose an obligation upon the lessee to operate any well of that capacity and to pay to appellee the stipulated rentals and royalties. If, when a well was sunk and tested, it did not produce the quantity mentioned the lessee was not required to operate it, but if he chose to operate the well and take gas from the leased land no .reason is seen why he should not pay the stipulated share to the lessor.
Nor is there any reason why appellee was not entitled to show the quantity, of gas taken from his land through wells drilled on adjoining lands.- It was reasonably well established that there was a pool of gas under appellee’s land which extended under adjoining lands on which appellants had wells that were being operated. It is clear that the taking of gas from these wells would drain that underlying the land of appellee. Appellants can not escape liability for the gas extracted from appellee’s land through the wells sunk by them on *535the adjoining land. In section 101 of Thornton on The Law Relating to Oil and Gas it is said:
“A lessee must act in good faith in the operation of the leased premises. He can not under the guise of ownership of the adj oining premises drain the lands he has leased by sinking wells on such premises, under the claim of a right to do so, and not put down a sufficient number of wells on the leased territory as will protect it from the wells operated on such adjoining territory, when the lessor, at least, receives his compensation by a royalty on or a part of the oil produced, or by a rental of so much per producing well.”
Since the number of wells to be drilled on the land was not specified there was an implied obligation on appellants to fully develop the land and put down as many wells as were necessary to secure to appellee his proportionate share of the pool of gas. (Kleppner v. Lemon, 176 Pa. St. 502, 35 Atl. 109; Thornton, The Law Relating to Oil and Gas, § 91.) According to the findings appellants failed to develop the land in such a way as to give appellee, his proportionate share of the gas produced from the pool, and that to have done so would have required the sinking of at least another well. Having failed in this respect the appellee is entitled to recover his share of the gas actually taken from his land without regard to which side of the line the wells through which it was taken were sunk. The quantity so taken appears to have been fairly well established by the evidence. In Howerton v. Gas Co., 82 Kan. 367, 108 Pac. 813, it was said:
“No reason is shown why witnesses of experience, acquainted with the gas field, may not testify with reasonable accuracy as to the number of wells which should have been drilled on the leased land, both for protection from drainage by neighboring leaseholders and to obtain the gas underneath the land.” (p. 369.)
Nor is there any reason why witnesses could not as well testify with reasonable accuracy as to the quantity of gas obtained from the wells. Appellants say they *536should not be held to pay for the gas because the lease only required that they pay one-eighth of the money received from the sale of gas and that they did not sell gas to others. The taking of the gas from the land by appellants and the piping of it to their factory, where it was used in manufacturing cement that was sold on the general market, is a sale within the meaning of the provision of the lease. Besides, this provision was intended for another purpose, as we have seen, and can not be used to relieve appellants from paying for gas actually taken from appellee’s land.
The judgment of the district court is affirmed.