In November 1928, David E. Thompson of Lincoln, Nebraska, by deed conveyed in trust to The First Trust Company of Lincoln, Nebraska, bonds of the Pan-American Railroad Company of the face value of $800,000 together with interest coupons attached and maturing after January *3671, 1928. The bonds are dated December 31, 1906, and the maturity date is January 1, 1937. The trust by its terms is irrevocable. The purpose of the trust as disclosed by the deed was “for the use, foundation, establishment, and acquisition of suitable grounds, buildings and- equipment and the operation and maintenance of a home for homeless children within the State of Nebraska * * * .” By the deed the initial control of the trust and the power to organize its. functions were reposed in Charles D. Mullen of Lincoln,. Nebraska, and Halleck F. Rose of Omaha, Nebraska. The power to set up a plan for a board of trustees and succession to such board was also reposed in these two designated persons. The trust is charitable in quality. On this proposition all parties hereto are in agreement.
After the execution of the deed of trust the bonds were delivered over to The First Trust Company and they have, been held by it ever since. No principal 'amount has been paid on the bonds and no interest coupons have been paid. This was through no fault of The First Trust Company of Lincoln. It appears that diligence has been exercised in efforts at collection.
Some years ago Halleck F. Rose died leaving Charles D. Mullen as the sole trustee for the purpose of carrying into effect the purposes of the trust. The said Mullen, pursuant to the power contained in the trust deed, designated The First Trust Company of Lincoln as cotrustee to succeed Halleck F. Rose. Thus The First Trust Company of Lincoln became a cotrustee for the purpose of carrying into effect the purposes of the trust as well as the trustee of the res under the deed.
David E. Thompson is now deceased. He died testate. By the terms of his will David E. Thompson, Jr., was designated as sole residuary legatee if living at the time of the final distribution of the estate. If he was not living at that time then Helen F. Thompson, widow, was to become the residuary legatee. If neither was. living then the residue was to go to the “Home for Homeless .Children.” David E., Thompson, Jr., is still living. Whether, or’not there has.. *368been a final distribution of the estate does not appear in these proceedings.
In May 1945, The First Trust Company of Lincoln, Nebraska, as trustee of the res of the trust, filed its petition in equity in the district court. In the petition David E. Thompson, Jr., Helen F. Thompson, widow of the deceased, Charles D. Mullen, The First Trust Company of Lincoln, Nebraska, as successor trustee to Halleck F. Rose, and Walter R. Johnson, Attorney General of the State of Nebraska, were made parties defendant. In the petition it was declared that the trust was a charitable one; that no recovery had been made on the bonds or the interest coupons and that none was possible in excess of nine cents on the dollar of the face value thereof and that if recovery could be had in this amount it would be entirely insufficient to carry into effect the objects and purposes defined and declared in the deed of trust.
In the prayer the district court was asked to take jurisdiction of the trust in order to prevent its nullification and in order that its purposes might be carried out so far as possible as intended within the scope of the general expressed purpose. A further prayer was that the trustees be authorized to negotiate for sale and to sell and dispose of the bonds for the highest sum obtainable; that if the court found it not desirable or possible to construct a separate physical plant or to maintain a separate organization that the funds received or to be received be disbursed to the Saint Thomas Orphanage; and for general modification of the deed of trust.
Walter R. Johnson, Attorney General, filed an answer the effect of which was to assume his proper duty with regard to charitable trusts and to place the plaintiff on strict proof.
Charles D. Mullen, trustee, in an answer admitted the allegations of fact contained in the petition and joined in the prayer thereof.
David E. Thompson, Jr., by answer substantially admitted the allegations of the petition and joined in its prayer.
Tabitha Home, Saint Thomas Orphanage, and Lutheran *369Children’s Home Society, with permission of the court, .filed separate' petitions of intervention in the action. Each of these interveners contended in substance that the design, purpose, and use of its institution and facilities came within the general charitable purpose of the trust and each prayed that if the declared purposes of the trust deed could not be carried but that the funds to bé collected be turned over to it to be used in furtherance of its own designs, purposes, and uses. By appropriate pleadings issues were joined on the questions raised.
A trial was had and the court found and decreed that it had jurisdiction of the subject matter and that it was its duty to modify the terms of the trust to enable the same to be carried out in accordance with the intent and general purpose of the donor; that plaintiff was authorized to deviate from the trust deed and to do and perform what is necessary to carry out the primary purposes of the deed of trust, that is to provide a home for homeless children; that plaintiff and Charles D. Mullen were authorized to negotiate for collection, settlement, compromise, or sale of the bonds in question and to report the highest offer obtainable; that it was not possible to construct a separate physical plant or to maintain a separate organization as contemplated by the deed hence it was ordered that the net amount of funds received from a disposition of the bonds when available should be disbursed to the interveners, Saint Thomas Orphanage and Tabitha Home, share and share alike, to be used exclusively under the direction of the court to maintain homes for homeless children as contemplated by the donor. There are other provisions in the decree but it is not necessary to mention them here.
From the decree the intervener, the Lutheran Children’s Home Society, has appealed. The Saint Thomas Orphanage, intervener, has cross-appealed.
The parties plaintiff and defendant agree that the deed sets up a charitable trust; that on account of the actual value of the res the trust cannot be carried into effect in the manner set out in the deed; that under the law it could *370not properly lapse; that the district court has jurisdiction over it and has power in the exercise of proper discretion to provide for its disposition; that no intervener or any other organization is of right entitled to the avails of the trust; and that the court in its disposition is required to dispose of the trust in such manner as to, as nearly as possible, effect the general purpose of the trust as set forth in the deed.
The appellant as ground for appeal contends that the court erred and abused its discretion in finding and decreeing that the Tabitha Home and the Saint Thomas Orphanage were the two organizations wherein the general purpose of the trust could most nearly be effected and in assigning its avails to them. It contends that the Lutheran Children’s Home Society fits into the expressed general purpose at least equally with the other two interveners.
The cross-appellant substantially contends that the court erred and abused its discretion in refusing to find and decree that the Saint Thomas Orphanage was the institution or organization wherein the general purpose of the trust could most nearly be fulfilled and in refusing to assign the entire avails of the trust to it.
None of the other parties appealed or cross-appealed but the briefs of all other parties, except Tabitha Home, are in support of the contention of the Saint Thomas Orphanage. The briefs of the Tabitha Home seek to sustain the decree.
It is well settled in this jurisdiction that where a definite charitable trust is created, the failure of the particular mode by which its dominant purpose is to be effected will not defeat the charity, but under such circumstances a court of equity will, under the judicial cy pres doctrine, substitute another mode if it may be done within the scope of the donor’s dominant purpose. Hobbs v. Board of Education, 126 Neb. 416, 253 N. W. 627; School District v. Wood, 144 Neb. 241, 13 N. W. 2d 153. All parties are in accord on the proposition that this case is properly determinable within the purview of this rule.
In the substitution of a mode of effecting a charitable *371trust, of necessity, the court is called upon to exercise a discretion. It must be a sound, a judicial discretion. The discretion required is well defined and outlined in Pettegrew v. Pettegrew, 128 Neb. 783, 260 N. W. 287, by quotation from Langnes v. Green, 282 U. S. 531, 75 L. Ed. 520, 51 S. Ct. 243, as follows: “ ‘The term “discretion” denotes the absence of a hard and fast rule. * * * When invoked as a guide to judicial action it means a sound discretion, that is to say, a discretion exercised not arbitrarily or wilfully, but with regard to what is right and equitable under the circumstances and the law, and directed by the reason and conscience of the judge to a just result.’ ”
Section 13818 of the Iowa Code of 1927 defines the discretion required in passing upon applications for change of venue as follows: “The court, in the exercise of a sound discretion, must, when fully advised, decide the matter of the petition according to the very right of it.” It was quoted with approval in State ex rel. Fletcher v. District Court, 213 Iowa 822, 238 N. W. 290, 80 A. L. R. 339. We approve it as a definition of the judicial discretion which should control the action of courts in cases such as the one being considered here.
In order to determine the question of whether or not the court exercised a sound discretion in its selection of a mode and an agency or agencies as a substitute for that set forth in the deed it becomes necessary to further examine the deed and the evidence in the case.
As has already been pointed out the trust was created for the purpose of acquiring and maintaining in perpetuity a home for homeless children within the state of Nebraska. This was the general, the primary, the fundamental purpose. The power to organize and establish such an institution and to provide for continuity of control of the establishment was reposed in Charles D. Mullen and Halleck F. Rose.
The deed contains the following restriction upon the conduct and operation of the charity: “In the conduct and operation of said charity, no religious test shall at any time be *372applied as a condition of admission to or continuance in said home of any child otherwise qualified to receive its benefits, and the same shall not at any time come under the control, management, or exclusive patronage of any sectarian order, church, church organization or government. This restriction shall not, however, prevent training and instruction in morality, good citizenship, the non-sectarian study of the Holy Bible, the existence of Almighty God, and the foundation principles of the Christian Religion, all of which it is my desire to promote as essentials of the proper training of children, in so far as may be consistent with the strict maintenance of the non-sectarian character of the institution.” The deed contains no provision for reversion, or for a departure from this provision or any other provision. In fact by clear statement it was the intention that there should never be a lapsation of the trust.
Each of the three interveners comes under the restriction against control and management by sectarian order, church, church organization or government. This fact, however, no one ^contends is a bar to the assignment of the trust under the circumstances of this case and the judicial cy pres doctrine. Furthermore, no institution or organization has come forward or been advanced to receive the trust not under the auspices of some sectarian or church organization.
Under the evidence it is clear that the Saint Thomas Orphanage meets every other requirement in the restrictions upon the trust as well as every other attribute and requirement in the conduct of an orphanage. Orphans without regard to age, sex, nationality, or color are accepted. Provision for proper care is provided in the institution. There can be no doubt that this institution is eligible to become a benefactor of this charitable trust and the trial court did not err or abuse its discretion in so finding and decreeing.
The additional pertinent facts in brief detail as to the Tabitha Home are that it is an institution which conducts an old people’s home and an orphanage and it contemplates *373the erection of facilities for the separate care of crippled children. According to the evidence if the institution is allowed to receive of the avails of the trust without restriction as to use the funds so received would first be used in the construction of the facilities for crippled children. However, a willingness was expressed to follow the direction of the court in the use to which the money should be applied.
We think, therefore, that there could be no objection on this score to an assignment to the Tabitha Home since by proper order the court could and would see to it that it would be used in furtherance of the general purpose expressed in the deed.
Objection is made that with regard to orphans the Tabitha Home places its main emphasis on placement in homes. We think this, if true, is not validly objectionable. The child who has a home and the benefit of its sacred influence is the fortunate child. The child who has lost these things is the unfortunate one. The person or institution that seeks to restore fortune to the unfortunate is deserving of the highest commendation. The donor of this charity undoubtedly was possessed of this sentiment when he said in the deed of trust, “ * * * it is my intention hereby to safeguard the principal thereof and its accumulations from diminution, dissipation and waste as a sacred trust for unfortunate and homeless children.”
It is further objected that no educational opportunities are offered in Jhe institution but that the inmates are required to attend the public schools. While the record discloses that attendance is at the public schools there is nothing to indicate any inconvenience or inadequacy in this respect. We conclude that the objection is without merit.
A further and more serious objection is made and that is that there are restrictions on eligibility for admission which depend on age. The constitution of the institution does contain an inhibition against the acceptance of children under the age of three years and by practice at the *374time of the trial they were not being accepted over the age •of twelve years.
We are impelled to the view that the donor of this trust contemplated that his benefaction should extend to all unfortunate homeless children of Nebraska and that its fruits should not be denied to any on account of age. If this be true then this institution, under the rules of law hereinbefore announced and the evidence, cannot be permitted to participate in the avails of the trust. While its mode of operation is calculated to carry into effect some of the requirements, there is another, the Saint Thomas Orphanage, whose mode of operation is more nearly calculated to carry into effect the general purpose declared in'the deed of trust. This being true the trial court erred in assigning a part of the trust to the Tabitha Home.
The Lutheran Children’s Home Society maintains an orphanage exclusively. It also follows a policy and practice of placing children who have come to it in homes. What was said of the like policy and practice at the Tabitha Home is equally applicable here. It has no school facilities of its own but sends its charges to the Lutheran Parochial School at Fremont, Nebraska, which city is the situs of the orphanage. There is no contention that the facilities are inadequate or that the educational opportunity is insufficient.
The controlling factor in determining whether or not this institution should be allowed to participate in the avails of the trust depends, as in the case of Tabitha Home, upon the matter of eligibility for entrance •and occupancy. Thé record discloses that children are eligible for admission “from the time they can leave the mother” and are kept “if it is necessary so to do, until normally the time of completion of 8th grade,” thereafter an attempt is made to send them to Concordia College at Seward, Nebraska. This is a restriction not found in the operation of Saint Thomas Orphanage.
On the basis of the reasoning which caused us to conclude that the court erred in assigning a part of the avails of the *375trust to Tabitha Home we conclude that the court did not err in not assigning a part thereof to- the Lutheran Children’s Home Society.
On all of the facts as presented by the record we have arrived at the conclusion, and so find, that the general purposes of the trust in question as disclosed by the deed will most nearly be met and carried out by assignment of the avails thereof in their entirety to the Saint Thomas Orphanage.
The decree to the extent that it assigns a portion to Tabitha Home is reversed and the cause remanded with directions to assign the entire avails of the trust to the Saint Thomas Orphanage. In all other respects it is affirmed.
Affirmed in part,
Reversed in part, with directions.