Opinion by
Mb. Justice Williams,
Is a machine shop belonging to a railroad company and used exclusively for repairs in its own business subject to taxation by the local authorities? This must depend upon the answer to the question whether such repairs are reasonably neeessary to the successful prosecution of the business of the railroad company. If the shop is for the original construction of locomotives or cars, it is, under all our cases, subject to local taxation. A manufactory is no necessary part of the equipment of a carrying company, whether the carriage is conducted upon land or by water. Nor can a corporation engage in any other line of business than that which its charter and the general law under which it was granted authorizes. It may do the work for which it was created with as efficient and useful methods as it can command, and its preparations to serve the public and compete with its rivals are within its corporate powers and are therefore, covered by the taxation to which the state subjects its corporations. The application of this rule has in the main been uniform and consistent. It was stated with clearness and force in the Lehigh Coal and Navigation Company v. Northampton County, 8 W. & S. 334, in which we held that the “bed, berme bank and towpath of an incorporated canal are not taxable as land .... nor are the tollhouses and collectors’ offices belonging to it and incident thereto.” The reason given was that these were a necessary part of the canal itself, without which its business could not be properly carried on. Freight and passenger depots upon the line of a railroad were considered in The County v. The Coal and Navigation Company, 75 Pa. 461. It would be possible to discharge passengers and freight into the *620streets and so dispense with such structures, yet we held that they were reasonably necessary to the business of the railroad company and constituted a part of its corporate machinery, properly employed by it as incident to' its carrying trade. They were therefore not taxable by the local authorities. This rule was held in the Cumberland Valley Railroad Co. v. McLanahan, 59 Pa. 29, to include all buildings required for and in use by the company in its ordinary operations, such as water stations, tollhouses, watchhouses, oilhouses and “whatever buildings without which the railroad would not be a complete and perfect railroad.” The same test is applied impartially to other corporations. In Wayne County v. Delaware and Hudson Canal Company, 15 Pa. 351, it was applied to a water company, and its reservoir was held to be protected from local taxation as real estate. In West Chester Gas Company v. The County of Chester, 30 Pa. 232, it was applied to a gas company. In Lackawanna Iron and Coal Company v. The County of Luzerne, 42 Pa. 424, to a corporation engaged in making and manufacturing iron. In the latter case we said: “ The public'works of corporations used as such with their necessary appurtenances are exempt from taxation; but all the property owned by them, whether real or personal, is liable to assessment and taxation.”
The application of this rule to the case now before us requires us to affirm the judgment of the Superior Court for the reason that repairs are reasonably necessary as an incident to the business of the plaintiff company. New cars are merchandise, and can be bought in the market as they may be wanted. Locomotives may be obtained in the same manner, just as the need for them becomes apparent. But the almost infinite variety of breakage, due to constant wear and to the power required for the movement of cars makes it necessary for a railroad company to maintain shops at convenient places along its line with an adequate force of men and tools to mend and make fit for continued service all its appliances of transportation with the least possible delay. Many repairs can be made, if only the mechanics with their tools are at hand, in so short a time as not seriously to delay the movement of the cars on which they are needed; while serious delays would be the necessary result of detaching them and sending them to some general repair shop where they would be compelled to wait their turn for the attention needed, *621if such a system was compulsory upon the company. Current repairs we hold to be one of the necessities of the business of transporting passengers and freight. A shop in which such repairs are made is reasonably necessary as part of the corporate equipment of the carrying company, and cannot be taxed as real estate by the local authorities. It is thought that the case of the East Penna. Railroad Company, 1 Walker, 428, is authority for a contrary doctrine. In that case the local authorities had assessed with taxes a three story brick building at the corner of Sixth and Walnut streets in the city of Reading. This was several squares away from the railroad of the company, and had no connection with its track or railroad property. The president of the company resided with his family in the building and had his office there. Some other of the general offices of the company were located in the same building. The company defended against the payment of the taxes by setting up the rule adopted in 8 W. & S. 884, and alleging that the use of the building wherever it might be located made it a part of the “public works” of the company. We did not take that view of the question, but held that the building having no connection with the defendant’s road was no more a necessary appurtenant to it than any other house in the city of Reading would be if the company chose to rent and occupy it by its officers or employees. The company might prefer to occupy one building rather than another, or find one more convenient than another, but neither preference nor convenience is the test. It is necessity, reasonably regarded with reference to the purposes for which the corporation was organized. So far, the East Penna. Railroad Company’s case was rightly decided. But the county of Berks appealed from the same judgment and the cross appeal was heard, decided, and reported with the appeal of the Railroad Company, supra. In the latter case it was held upon the facts as then before the court that the repair shop and blacksmith’s shop in use by the company in its own business, and neither engaged in construction nor in custom work, was subject to local taxation.
This case derives no support from the cases preceding it, nor has it upon this particular point been followed by the latter ones. On the contrary, the distinction between construction and repair has been generally recognized. In Penna., etc., Co. v. Vandyke, *622137 Pa. 249, the shops operated by the company were held liable to local taxation because they were mantained “ for the construction and repair of its locomotives and cars.” The fact that they were used for construction made them liable, notwithstanding repairs might also have been made at them. This distinctionseems to us to rest on principle as well as on the authority of our own cases. The business a corporation may lawfully do must be defined by its charter. If it is to supply a municipality with water or gas, its implied or incidental powers must be -such as ar’e reasonably necessary to the proper performance of its functions as a water or a gas company. It cannot manufacture pipe because it may need' pipe in the distribution of water or of gas. It cannot engage in the manufacture of plumbers’ supplies because it might be profitable to be able to supply its customers with such goods. Its business is one; the supply of water or gas, as it may be, to its customers, and to this it must devote its attention and confine its operations. It is precisely the same with a railroad company. It is given great privileges and franchises to enable it to build and operate a line of railroad for the public convenience and its own private profit. It must devote itself to the business for which the state has created it and clothed it with its powers and privileges. It may not embark in the mining of coal without leave. It may not engage in the business of making and manufacturing iron and steel; or in the production of textile fabrics; or in the establishment of commercial houses; or any other business enterprise not incident to and reasonably necessary for the successful running of a railroad. It may improve its road to any extent that it is practicable to do. It may avail itself of the best known equipments and adjuncts so long as they are equipments and-adjuncts only; and make its road as nearly perfect as it may be able. It may provide the best known machinery and the means for keeping it as nearly as possible in constant order and repair, but here is the exterior limit of its appropriate field of operations. It may buy the best rails and cars and engines the manufacturing establishments of the world can offer. It may operate them with the highest skill it can command. It may employ all necessary mechanical talent to keep its road and its rolling stock in the best possible state of repair, and to offer the public the greatest efficiency and safety attainable in its business. *623Tliis is tbe legitimate province of a railroad company, and within it is ample room for the employment of its capital, and for the exercise of the highest administrative powers within its reach. With this province it must be content. If it steps over its boundary local taxation is among the penalties which it incurs, and which it ought to be ready to submit to without protest.
The judgment of the Superior Court is affirmed for the reasons now given.
The case reported in 1 Walker, 428 is distinctly overruled so far as it is in conflict with the rule iaid down in the foregoing opinion.