Rodenbeck, J.
The right of the plaintiff to discontinue and abandon any portion of its railway system covered by the mortgage, of which the Security Trust Company of Rochester is the trustee, may be found in the terms of the mortgage agreement, or, if not contained in that instrument, may be obtained, under proper circumstances, through the exercise of the equitable powers of the Supreme Court.
The instrument under consideration is a mortgage upon the properties of the plaintiff, to secure bonds to take up outstanding underlying bonds, and for other purposes, and covers the railway system then owned and operated by the plaintiff, and such replacements, extensions or improvements as might thereafter be made. This system of railways covered the network of street railways in Rochester, Syracuse, Utica, Oneida, Rome and elsewhere, and was, at that time, a growing, expanding and promising enterprise, which it was necessary to adjust, from time to time, to an ever-increasing territory and population, and to adapt to changes in methods of' transportation and to other conditions, which could not wholly be foreseen, affecting that subject. It is a matter of common knowledge that steam, electricity and gasoline have vied with one another, according to circumstances and conditions, as the most *458practicable method of transportation in given cases, and a change from one to the other involved expensive changes in equipment and otherwise. The introduction and extension of the use of gasoline for the propulsion of vehicles, which require no track upon which to operate, has introduced another factor with which companies operating upon tracks and with other motive power, have had to contend for patronage. These are all conditions that any system of railways was required to meet, whether mortgaged or not, if it expected to continue to exist and to operate profitably. These new conditions can be met only by changing the motive power and substituting electricity for steam, or gasoline for electricity, or buses for cars operated upon tracks, as the case may require, and these changes may be necessary to preserve the properties underlying the obligations secured by mortgage upon such properties. The adjustment to new conditions and the reasonable operation of a railway system will require the extension of the system by the construction of new lines to enlarge territory, but, also, the discontinuance of lines which no longer serve a useful purpose, or which are unable, in their present form of operation, to compete with the introduction upon highways of other forms of transportation better adapted to the demands of the public.
All of these considerations will be assumed to have been in the minds of the framers of the mortgage involved here, and any construction of the mortgage necessary to keep the railway system of the plaintiff up to date will be read into the agreement, where the language used is capable of such a construction and there is nothing expressly to the contrary. When this mortgage was made, the parties knew that the property covered by it was not a fixed and inflexible substance, but a transportation enterprise, in active operation, consisting of tangible and intangible property, very sensitive to new conditions and to public sentiment. It was clearly in the minds of the parties, when the agreement was made, that improvements and extensions would be required, and these matters are expressly recognized in the agreement and provided for, and it was also equally well understood that the system, branches and extensions, during the life of the mortgage, would not remain just as they were when mortgaged and, especially, that replacements, improvements and changes would be required. There is nothing in the agreement directly mentioning the abandonment of any part of the railway system, but there can be no question that the discontinuance of some useless and unprofitable portions of the system were expected, in the usual process of the normal operation of the railway system, in the exercise of good business methods, and that branches and extensions, serving profitably, *459at the time of the execution of the instrument, a given section of the territory covered by the railway system, might be discontinued, when they failed to serve a useful and profitable part of the railway system. The agreement in numerous places refers to replacements, improvements, extensions and “ other properties now or at any time hereafter acquired,” “ which are to be subjected to the lien of the mortgage,” and then the agreement expressly provides that the New York State Railways shall “ possess, manage, operate and enjoy all the estates, properties and premises, rights, privileges and franchises, conveyed, and transferred hereby, or intended so to be, and to renew, substitute and repair the same, * * * in the same manner and with the same effect as if this mortgage had not been made, and to retain all the rights, powers, duties and privileges belonging or incident to the full ownership thereof, except such rights, powers and authorities as are inconsistent herewith.” In other words, the New York State Railways was to operate the system of railways owned by it, the same as theretofore, which would, of course, include such replacements, improvements and extensions as might be necessary, and, also, any discontinuance of useless and unprofitable parts of the railway system, as might be shown from experience, over a term of years, to be a burden upon the company and an impairment of the income with which to meet the interest and principal of the bonds. This is the construction that should be given to the mortgage agreement and which was in the minds of the parties when it was made, and, under which, alone, a workable mortgage could be applied to a living transportation enterprise such as that of the plaintiff. This construction is not subject to abuse, since any unreasonable proposed action by the mortgagor could be restrained by a proper proceeding. Neither mortgagor nor mortgagee can change the tide of events or alter new conditions arising in the course of time, and both should be prepared to meet new situations and to adjust the properties covered by the mortgage to the changed circumstances. The public authorities have felt bound to recognize changed conditions wdth respect to street railway transportation, and have placed the matter of fare upon a service at cost basis, instead of upon a flat rate, and the holders of bonds secured by mortgages upon the properties of these companies must face the same changed conditions and must co-operate in the readjustment to the new conditions. It is a condition, not of their own creation, that confronts the parties, and their rights must be determined to meet it in a practical way for the best interests of all. The mortgagee, in this instance, is willing to accept additional security for its mortgage in the form of replacements, improvements and *460extensions, and it should be prepared to accept any discontinuance of unnecessary, useless and unprofitable portions of the railway system. Such discontinuances aie clearly contemplated and are only subject to question when they are of an extraordinary character. It cannot be contended, reasonably, that a few hundred feet of the road, which has been extended to serve a particular purpose, cannot be discontinued when that purpose ceases to exist. The extent of the discontinuances permitted is one of degree, and where the discontinuance is questioned it, then, becomes a matter for determination by the court. Ordinary replacements, improvements and extensions, heretofore made, have not been questioned, and extraordinary changes involving a discontinuance of one form of transportation and the substitution of another should be submitted to the mortgagee, and, if not consented to, the appropriate remedy is an application to the court for such approval, after consents by the public authorities, wherever required, have been obtained.
There is a clause in the agreement which permits the plaintiff, when not in default, to exchange, sell or withdraw “ all, or any part of the estates, properties and premises hereby conveyed (other than the said railways itself, its rights, privileges and franchises, branches and extensions),” but this provision applies to the railway system as a whole, and was not intended to prevent the company, in the economical operation of the road, to discontinue useless and unprofitable parts of the system. The language, referred to, was intended, merely, to prevent the plaintiff from disposing of the system of railways, branches and extensions, treated as a unit, and was not designed to prevent the plaintiff from adjusting or readjusting its system to new conditions and circumstances arising after the execution of the agreement. The agreement, read as a whole, contemplated that the plaintiff would operate the system “ in the same manner and with the same effect ” as if the mortgage had not been given, which were the only practicable terms upon which such a mortgage could be made. But it, also, intended that the plaintiff should not alienate its properties, as a railway system, which constitute the heart of the security and the basis of the income from which the interest and principal of the bonds might be paid. The agreement was not drawn with the thought that the operation of any portion of the railway system might prove unprofitable, but that some portion might become worn out, or otherwise unnecessary, and the situation now confronting the plaintiff, with respect to portions of its lines, is controlled by the broader power, contained in the agreement, leaving in the plaintiff “ all the rights, powers, duties and privileges belonging or incident to *461the full ownership thereof, except such rights, powers and authorities as are inconsistent herewith.” The clause referred to is a reservation, rather than a prohibition, as to the railway system, to be dealt with in other parts of the agreement, and the reservation is covered by the general power conferred upon the company to operate and manage its system of railways for the best interests of all parties concerned. “ Equity follows the law,” but the law is not such an inflexible body of rales that it cannot be made to follow equity when the circumstances irresistibly point that way.
But, if the- agreement were to be construed as prohibiting the plaintiff from discontinuing an unprofitable branch or Une and to compel it to continue to operate such a branch or line at an annual loss, not only impairing the returns available for the interest and principal of the bonds but of possible- dividends upon the stock, or to suffer a default, where it appears tha such portions constitute a small part of the entire system and cannot be profitably operated in any other manner, it would be clogging the use of the property to an unnecessary extent, and would be so unwieldy and oppressive, that it would constitute a proper basis for the application of the equitable powers of the court. A court of equity will not enforce a covenant, where the conditions have changed so as to frustrate the purposes of the covenant (Trustees of Columbia College v. Thacher, 87 N. Y. 311; Rector of St. Stephens, etc., Church v. Rector, etc., Church of Transfiguration, 201 id. 1), and it, likewise, should give relief from an agreement, where the enforcement is impracticable, oppressive and useless. It may remove a restrictive covenant as a cloud upon the title, where the covenant has lost its initial vitality (McArthur v. Hood Rubber Co., 221 Mass. 372), and, so, it may authorize the abandonment of a part of a railway system, where its operation is an increasing burden upon those financially interested in the road. (Mayor of Baltimore v. United Rys. & Electric Co., 108 Md. 64.) Where there is no provision for releasing a lien of preferred stock upon a useless piece of real estate, a court of equity will relieve the property from the lien where it is necessary to conserve the capital invested. (Leviness v. Consolidated Gas, etc., Co., 80 Atl. 304.) In Colorado & Southern Ry. Co. v. Blair (214 N. Y. 497) the court said: “ We may assume that a court of equity under its general supervisory power over trusts may in the interest of all parties direct a sale of the trust property, though not authorized by the instrument creating the trust.” (P. 512.) In Johns v. Montgomery (265 Ill. 21) it is held that a court of equity has jurisdiction to modify the terms of a trust when unforeseen conditions have arisen which require such modification, in order to protect the trust estate. “ We think it well *462settled that a court of equity, if it has jurisdiction in a given cause, cannot be deemed lacking in power to order the sale of real estate which is the subject of a trust, on the ground, alone, that the limitations of the instrument creating the trust expressly deny the power of alienation.” (Gavin v. Curtin, 171 Ill. 640, 648.) “ Exigencies often arise not contemplated by the party creating the trust, and which, had they been anticipated, would undoubtedly have been provided for, where the aid of the court of chancery must be invoked to grant relief imperatively required; and in such cases the court must, as far as may be, occupy the place of the party creating the trust, and do with the fund what he would have dictated had he anticipated the emergency.” (Curtiss v. Brown, 29 Ill. 201, 229.) Where the urban portion of a railway is transferred and thus separated from the interurban portion, a court of equity may allocate and segregate the bond issue covering both portions, to their respective shares. “ There are circumstances under which a court of equity may act in opposition to the provisions of the trust; it may do whatever is necessary for the preservation of the trust property, and, in general, whatever is necessary, for the protection of the rights of the beneficiary, and for the promotion of their interests.” (City of Detroit v. Detroit United Ry., 197 N. W. 697.) Under these extraordinary equitable powers of the Supreme Court, it is evident that, where a portion of a railway system is clearly unprofitable and will continue to be a burden upen the company, if its operation is persisted in, the court may authorize its discontinuance and abandonment, upon such terms and conditions as may seem just, although covered by the lien of a mortgage held in trust.
There are sufficient bondholders represented among the defendants to warrant a decree binding upon them all. It is evidently impracticable to secure the presence of all of the bondholders, and as their interests are “ equal and proportionate,” an adjudication in which the questions involved are thoroughly considered should be binding upon all of the bondholders. The statutes of this State permit of such adjudication and are based upon necessity, without which the rights of the parties to a controversy, like the present one, could not be determined for want of the presence of some of the bondholders. (Civ. Prac. Act, § 195.) In Colorado & Southern Ry. v. Blair {supra, 515), where the subject of the proper parties defendant was considered, the court said: “ If upon proper allegations some of the bondholders had been made parties in the prior suit, it would doubtless have been within the discretion of the court to proceed without the presence of the others.” There are enough bondholders among the defendants to make it equitable *463that all the bondholders should be bound by the decree. The question is one of common interest and it is impracticable to bring all of the bondholders into court, and, in sueh a case, it is enough if there are sufficient defendants, honestly, fairly, and fully to ascertain and try the general right in contest. (Story Eq. PI. [10th ed.] § 96 el seq.) “ For convenience, therefore, and to prevent a failure of justice, a court of equity permits a portion of the parties in interest to represent the entire body, and the decree binds all of them the same as if all were before the court.” (Smith v. Swormstedt, 16 How. [U. S.] 288, 302.) “ Where it appears that a particular party, though not before the court in person, is so far represented by others that his interests receive actual and efficient protection, the decree may be held to be binding upon him.” (Hale v. Hale, 146 Ill. 227, 256.) (See, also, City of Detroit v. Detroit United Rys., 197 N. W. 697, 702; Davis v. Peabody, 170 Mass. 397; McClelland v. Rose, 247 Fed. 721, 723; American Steel & Wire Co. v. Wire Drawers’, etc., 90 Fed. 598, 607; McArthur v. Scott, 113 U. S. 340, 395.)
Plaintiff, therefore, has the right to discontinue and abandon, and is authorized to discontinue and abandon, the Rochester and Sodus Bay Une and the parts of its system mentioned in the 21st paragraph of the complaint, and to use and apply the proceeds of the sale of any property included in such lines, useless for other purposes of the plaintiff in the operation of its railway system, as provided in the mortgage agreement.
So ordered.