I. The testator, George "W. Hastings, died on February 17, 1918. He left an estate which, under the evidence, is valued at approximately $70,000. He was never married. By the terms of his will, he first directed the payment of his debts and obligations. He then gave to four nieces and nephews the sum of $3,000 each. The third paragraph of his will is as follows:
“Subject to the foregoing provisions of this will and the payment of the expenses of administering my estate I give devise and bequeath all the rest and residue of my estate, real and personal, to the Christian Home, sometimes known and spoken of as the Christian Home Orphanage located at the city *179of Council Bluffs and incorporated under tbe laws of Iowa. The money and property here devised and bequeathed is intended to constitute a permanent endowment under the name of the ‘George W. Hastings Fund’ and to be kept invested in good safe interest-bearing or income-producing' securities. The principal of said fund is never to be encroached upon, but the interest and income therefrom may be used and expended by said home as the same may be needed for the benefit of the orphan children whom it may have in charge and in securing desirable and proper homes for such children.”
The appellee claims to be the illegitimate son of the testator. The contention is that the bequest under said Paragraph 3 of the will contravenes the provisions of Code Section 3270, which section is as follows:
“Any person of full age and sound mind may dispose by will of all-his property, subject to the rights of homestead and exemption created by law, and the distributive share in his estate given by law to the surviving spouse, except sufficient to pay his debts and expenses of administration; but where the survivor is named as a devisee therein, it shall be presumed, unless the intention is clear and explicit to the contrary, that such devise is in lieu of such distributive share, homestead and exemptions. No devise or bequest, however, to a corporation organized under the chapter relating to corporations not for pecuniary profit, or to a foreign corporation of a similar character, shall be valid in excess of one fourth of the testator’s estate after payment of debts, if a spouse, child or parent survive the testator.”
The initial question for our determination is whether or not the appellee has any right to invoke the provisions of said statute. Two questions inhere in this* contention: First, is it established that the appellee is the illegitimate child of the testator; and second, if the paternity of said appellee is legally established, can he invoke the provisions of the said statute?
Without reviewing in detail the evidence in regard to the paternity of the appellee, we are convinced that the record in the case clearly and convincingly establishes that the appellee is the illegitimate son of the testator. The appellee was born at Ackley, Iowa, November 6, 1879. His mother was, at the time of *180bis birth, a married woman, who had been deserted by her husband, from whom she subsequently obtained a divorce. Prior to the birth of the appellee, bastardy proceedings were instituted against the testator, in which proceedings he entered a plea of guilty. The record in said proceedings was introduced in evidence in the instant case. In said action a supplemental proceeding was instituted, which was appealed to this court. State v. Hastings, 74 Iowa 574. Referring to the father of the ap-pellee, we said in said case:
“By his plea of guilty in the original proceeding, and by express written averment in this proceeding, he claims to be the father of the child.”
The appellee spent his boyhood in the vicinity of Ackley. His mother has been dead many years. Numerous witnesses testified to an acquaintance with him. He passed under various names, — was sometimes known as Hastings, and sometimes as Lovell, which was his mother’s name.' Among his intimate associates he bore the sobriquet of'“Yankee George,” which had also been applied to his father. The story of the appellee’s life, as related by him as a witness, reads like the tale of Ahasuerus, the Wandering Jew. The curse seems to have been upon him that was pronounced against Cain: “A fugitive and a vagabond shalt thou be on the earth.” Whether in the little city where he was born or in the antipodes, whether enlisting in the navy, endeavoring to secure a passport, or seeking-employment in any form of occupation, he has been continually under the relentless stigma for which he was in no way to blame, and which he has been unable to escape. Such is the fate which our civilization has attached to those unfortunate ones who are condemned to bear the cruel title of “bastard.”
We find the evidence to be abundant and convincing that the appellee is the illegitimate child of the testator, George W. Hastings, and that the paternity was proven during the lifetime of the testator, and that the testator had generally and notoriously recognized the appellee as his child. See Code Section 3385.
*181*180II. Granting, then, that the appellee is the illegitimate son of the testator, we are at once confronted with the question as to whether or not he is, in legal significance, the “child” of *181said testator, within the meaning of Section 3270 of the Code. The limitation in said section provides that no devise or bequest to a corporation not for pecuniary profit shall be valid in excess of one fourth of the testator’s estate after payment of debts, if parent, spouse, or child survive the testator.
It must be conceded that, under the common law, an illegitimate offspring was not a “child,” within the contemplation of the law, and could not inherit from its father. Such is still the law of England and of a number of our states. The reasons for the origin of such a rule were doubtless twofold. One is the ostracism and odium which have been universally visited upon the illegitimate, since the days of Hebrew Moses. The other is the possibility of the assertion of fraudulent claims to heirship by those born “out of lawful wedlock.” The Israelitish lawgiver declared:
“A bastard shall not enter into the congregation of the Lord; even to his tenth generation shall he not enter into the congregation of the Lord. ’ ’ Deut. 23 :2.
The harshness of this inexorable command has been some-Avhat, but not wholly dissipated, as civilization has advanced through the succeeding ages. The Barefooted Peasant of Galilee said, “Suffer little children and forbid them not'to come unto me, for of such is the Kingdom of Heaven” (Matt. 19 :14); and it nowhere appears in Sacred Writ that the Great Teacher made any distinction in regard to the paternity of the children.
In McKellar v. Harkins, 183 Iowa 1030, we discussed the question of the right of inheritance down the line of the descendants of an illegitimate, when the paternity is properly proven. Speaking by Mr. Justice Evans, we said:
“The general purport of the argument in support of the contrary authority is the old rule at common law, that an illegitimate has no inheritable blood, and is without kin and without ancestry. Inheritances, therefore, cannot pass through the blood of a bastard. He can have no heirs save those of his own body; and the ancestry of such heirs terminates in the bastard. The rule is stated briefly by Kent as follows: ‘A bastard * * * has no inheritable blood, and is incapable of inheriting as heir either of his putative father or his mother, or of anyone else, *182nor can lie liave hbirs but of his own body.’ 2 Kent’s Commentaries 212. This rule has been one of the reproaches of the common law, which has shocked the legislative and judicial conscience of the civilized world. That a bastard has no inheritable blood is only a legal fiction. Legal fictions have their ax>propriate uses. They are the stepping stones of the law’s reasoning; the parables whereby its principles are illustrated. When its reason fails, the fiction falls. The fiction that a bastard has no inheritable blood has been shorn of its reason in this state by legislation. It remains, therefore, a fiction only. Our legislation has conferred upon the illegitimate the right of inheritance, with approximate' safeguards as to the certainty of paternity. Why, therefore, should we deal with finespun theories of the confmon law as to inheritable blood! The only justification ever offered for the common-law fiction was that bastardy should be rendered odious. But bastardy is the sin of the parent; not of the child. The illegitimate child is as innocent as the babe of Bethlehem. Yet the common law held its fiction as a shield over the guilty parent, and frowned upon the guiltless child with the disdain of a Pharisee. Our early territorial legislation struck at the cruel injustice of this fiction. From territorial days until now, there has never been a time in this state when it has not been contradicted by existing legislation.”
Whether the ancient prejudice will ever disappear under the enlightenment and 'charitableness of advancing civilization is a question that does not concern us further than the recognition of the fact that the historical reason for the rule has, to some appreciable extent, disappeared in these modern times.
The other reason, namely, the possibility of the assertion of fraudulent claims by illegitimates, still exists; and the courts of England and of many of our states still adhere to the rule that the word “child” refers only to “legitimate offspring, or children born in lawful wedlock.” The cases so holding may be found collected in 11 Corpus Juris 752. To avoid this rule, the legislature of this commonwealth, in territorial days, enacted statutes respecting the rights of illegitimate children. These statutes were carried into the various codes of the state, and have been the subject of interpretation by this court. Said sections are as follows:
*183“Section 3384. Illegitimate children inherit from their mother, and she from them.”
“Section 3385. They shall inherit from the father when the paternity is proven during his life, or they have been recognized by him as his children; but such recognition must have been general and notorious, or else in writing. Under such circumstances, if the recognition has been' mutual, the father may inherit from his illegitimate children.”
Code Section 3378, on the rule of descent, is as follows:
“Subject to the rights and charges hereinbefore provided, the remaining estate of which the decedent died seized shall, in the absence of a will, descend in equal shares to his children, unless one or more of them is dead, in which case the heirs of such shall inherit his or her share in accordance with the rules herein prescribed, in the same manner as though such child had outlived its parents.1 ’
Under the general statute respecting the descent of the property of an intestate, we have held that the word “children” includes illegitimate children, and that the right conferred upon an illegitimate to inherit from the mother carried with it the right to inherit from her ancestors whatever the mother herself would have inherited, if living. McGuire v. Brown, 41 Iowa. 650.
In Milburn v. Milburn, 60 Iowa 411, we said:
“Counsel agree that at common láw an illegitimate child could not inherit from either parent. This being so, it is evident that the common-law rule has been radically changed by statute; for, under the statute, such a child may inherit from its mother as if it was legitimate. If there are both legitimate and illegitimate children, they inherit from their mother share and share alike, and if an illegitimate child has been recognized by its father, it will inherit from him share and share alike with the legitimate children. For the purpose of inheritance, an illegitimate child, when recognized by its father, stands on precisely the same footing as if it were legitimate. If the father dies intestate, both inherit, and such right can only be cut off by a will of the father which is equally effectual as to both classes of children. The birth of a legitimate child entitles it to inherit, but this is not so as to an illegitimate child. For mere *184birtb does not entitle tlie latter to inherit, but the notorious recognition does. Such recognition legitimatizes the child.”
In Brisbin v. Huntington, 128 Iowa 166, we recognized the rule that, in the absence of statutory provisions modifying the common law with respect to illegitimate children, the word “child” was to be construed as applying only to those who are legitimate. We said:
“He is illegitimate after recognition, precisely as before, and inherits as such, and not because he has become legitimate.”
In Johnson v. Bodine, 108 Iowa 594, we held that Section 3385, conferring upon an illegitimate the right to inherit from the father when the paternity is proved, carried with it the right of inheritance down the line of the descendants of the illegitimate.
In Booz v. Booz, 183 Iowa 381, we held that a duly recognized illegitimate child became an heir, within the meaning of Section 1824 of the Code, requiring that the beneficiary of fraternal associations shall be a husband, wife, “heir,” etc., of a member.
In McKellar v. Harkins, supra, we conceded that the statute which confers the right of inheritance upon the illegitimate does not change his status as an illegitimate, but we said:
“Though illegitimate, her disabilities as to right of inheritance are lifted by the statute. Her paternity being proved with that certainty required by the statute, her biological blood line becomes endowed with the right of inheritance.”
It is obvious that our legislation has been framed directly to avoid the possibility of fraudulent claims by illegitimates, and to permit them to participate in the estates of their parents, under the conditions presented by the statutes.
It is, then, the rule in this state that an illegitimate child whose paternity has been recognized or established as required by our Code becomes entitled to all the rights of a legitimate child, so far as the general laws of descent and inheritance are concerned. The plain and obvious purpose of the legislative enactments was at least to provide that a duly recognized illegitimate child should have all the rights of inheritance of a legitimate child. That being true, our inquiry narrows itself somewhat to the question as to whether or not Section 3270 *185can be said to have an immediate and direct connection with the right of an illegitimate, duly recognized, to inherit from his father.
Under Section 3378, had the decedent, George W. Hastings, died intestate, the appellee would have participated in his estate as a “child” of said decedent. This cannot be doubted. The decedent had the right to execute a will by the terms of which he could deprive any child, legitimate or illegitimate, of any share whatever of his estate. There are but four limitations placed upon the absolute power of any resident of this state to. dispose of his property by will in any manner that he may see fit. (1) He can in no way dispose of the amount of his estate sufficient to pay his debts and expenses of administration. (2) Such power of disposition is subject to the rights of homestead and exemptions created by law. (3) He cannot, by will, affect the distributive share given by law to a surviving spouse. (4) He cannot dispose of his property to an eleemosynary corporation in excess of one fourth of his estate after the payment of debts, provided any spouse, child, or parent survive'him.
What is the purpose and intent of this statute? It has direct and immediate reference to the disposition of the estate of a decedent, as affecting those who otherwise would inherit it. If a decedent dies intestate, his property goes to his surviving wife, if any, and to his “children,” under the general law of descent and distribution. Under this statute, the word “children” includes a duly recognized illegitimate child. Shall it be held that the word “child,” in the section of the statute referring to the distribution of property by a testator, does not - also include a duly recognized illegitimate child? That is the' question. No good reason can be suggested why the legislature, in enacting these statutes, intended to make a distinction between the use of the word “child” in referring to the estates of those who died intestate and the same word in referring to the estates of those who execute a will. Both statutes have to do with the same subject-matter: to wit, the distribution of the property of a decedent. We think.it would be doing violence to the legislative intent to hold that in one of these statutes the word “child” does include a duly recognized illegitimate child, but that in the other statute it does not. There is exactly *186the same reason why the word “child” should mean the same where the ancestor dies testate as where he dies intestate. No good reason whatever has been or can be suggested for a distinction in the use of the word in these two statutes. They both pertain to the same general subject-matter, and should be construed in the same general way.
Many authorities in other jurisdictions have construed the word “child” to include a duly recognized illegitimate child, under certain statutes. A number of these decisions have interpreted statutes quite unlike our own. A review of these cases would be interesting, but quite without profit. ¥e construe our own statute in the light of our previous decisions, and in view of the legislation on the general subject-matter.
Our statutes deal with the rights of a duly recognized illegitimate child to participate in the estate of a deceased parent. The purpose of Section 3270 ivas to prevent a testator from disposing of more than one fourth of his estate to an eleemosynary corporation when the natural objects of his bounty, to wit, spouse, child, or parent, survive him. The “child” so referred to evidently and obviously means a child who would be entitled to inherit if the decedent had died intestate. Otherwise, the statute would be quite an absurdity. We therefore hold that the word “child,” in Code Section 3270, includes an illegitimate child whose paternity has been duly established in the manner provided by our statute.
The appellant Christian Home Orphanage is a corporation that-clearly comes within the purview of said section. It therefore follows that the bequest of the testator to said corporation is invalid, in excess of one fourth of the testator’s estate after the payment of debts.
The conclusion of the lower court in this regard was correct.
III. The statute, Code Section 3270, expressly provides that no bequests to an eleemosynary corporation shall be valid “in excess of one fourth of the testator’s estate after the pay-nient of debts,” if a parent, child, or spouse What is meant by the expression, ' ‘ after the payment of debts ¶ ’ ’ Are the legacies provided in the will to be regarded as debts, and to be deducted *187as such in making' the computation necessary to ascertain wbetlier the will impinges upon the statutory provisions?
Judicial definitions of the word are numerous. Hornbeck v. State, 33 Ind. App. 609 (71 N. E. 916). The word must be construed according to the subject-matter and the context with which it is used. Cole v. Aune, 40 Minn. 80 (41 N. W. 934); McNeal v. City of Waco, 89 Tex. 83 (33 S. W. 322). In Harrell v. Harrell, 123 Ga. 267 (51 S. E. 283), it is said, “A legacy is in no sense a debt.” Prince v. Prince, 47 Ala. 283, is to the same general effect.
Considering the word “debts” in connection with the statute under consideration, we are constrained to hold that it does not include legacies provided for in the will of the testator. The evident purpose of this statute is to prevent a testator who is survived by a parent, spouse, or child from disposing of more than one fourth of his net estate to an eleemosynary corporation. If the legislature had intended that such a testator could dispose of more than one fourth of his estate to such a corporation, in excess of his debts and legacies, it would have been easy to have so declared. We do not think that such was the legislative intent, and think that it would be doing violence to the language of the statute and the legislative purpose as expressed therein to construe the word 1 ‘ debt, ’ ’ in this statute, so as to include, not only the outstanding obligations owed by •the testator at the time of his death, but also the specific legacies bequeathed by the testator under the terms of his will. It was the evident purpose of the legislature that the net estate of the testator, after the payment of debts, should be ascertained as the basis for the computation necessary to ascertain the amount of the estate that could be bequeathed to an eleemosynary corporation. The debts so referred to were the obligations of the testator which were to be necessarily paid out of the assets of his estate before any distribution could be made to any beneficiaries under his will. These would necessarily include all of the valid claims established against the estate of the testator, and necessarily the costs of the administration of the estate. When these have been fully ascertained, they constitute the amount to be deducted from the gross assets of the estate, to ascertain what-may be properly termed the “net estate” for *188distribution to beneficiaries under the will. It is one fourth of said amount, subject to distribution to the beneficiaries of the testator’s bounty, that he may, under this statute, dispose of to an eleemosynary corporation. To such an extent, the bequest is Yálid. The bequeathing’ of any amount in excess of the one fourth so ascertained is invalid, under the statute.
In the instant case, the decree of the trial court should have ordered that the gross assets of the testator’s estate be ascertained; that there be deducted therefrom all claims proven and established against said estate, together with the costs of administration of said estate; and that, of the said net amount so ascertained, one fourth thereof could and did legally pass to the appellant corporation, under the terms of said will. After the payment of said debts and expenses of administration and the specific legacies provided for in said will, and the bequest of said amount, as herein designated, to the appellant corporation, the residuum of the estate of the said testator passed to the appellee, as his sole heir at law.
The decree of the lower court should have so provided, and to the extent herein indicated, the same will be modified.
IY. It is contended that the bequest to the appellant corporation was to said corporation merely as a trustee, and that the case comes within the rule of Rine v. Wagner, 135 Iowa 626. The instant case is not governed by said case and other similar cases. The bequest in this case’ is not to any individual as a trustee, nor is it a bequest to the appellant corporation as a trustee. The bequest is direct to the corporation itself, and it is provided that the income from the fund so created is to be “used and expended by the said Home as the same may be needed for the benefit of the orphan children whom it may have in charge and in securing desirable and proper homes for such children.” There is no suggestion in the bequest that the said corporation was to act as trustee. It was a bequest direct to the corporation, of funds to be used for the very purpose for which the corporation was organized, as shown by the record. The bequest comes clearly and specifically within the tenns of the statute.
*189*188Y. The decree of the court provided that the costs of the action “shall be taxed to the estate of George W. Hastings, de*189ceased., as this action amounted to a construction of the last will of decedent.” We are inclined to the view that the court erred, under the circumstances of this case; ^g gg^g 0f the trial of this case to the estate of the decedent. The effect of such order will be that the appellee, Avho has succeeded in his contention in said trial, will ultimately be taxed with three fourths of the costs of the litigation necessary to establish his rights. The appellant corporation was resisting the right of the appellee to any portion of the estate of said testator. The rights of creditors and of legatees under the will were in no way involved in this contest. The issue was squarely between the right asserted by the appellee, as against the claim oí the appellant corporation, and its resistance to said right. It is true that the executors under the will were made parties to said proceedings and appeared therein and joined with the appellant corporation in resisting the appellee’s claim. They were, to a certain extent, interested in the proper construction to be placed upon said will, and also in the manner in which the said estate should be distributed.
We think the case is one for an apportionment of the costs, and the costs will be apportioned, and one half thereof taxed to the estate of said decedent, and one half to the appellant corporation. The costs in this court will all be taxed to the appellant corporation.
In so far as heretofore indicated in this opinion, the decree of the trial court will be modified. In all other respects, it will be affirmed.
It is so ordered. — Modified and affirmed.
Stevens, C. J., Evans and Arthur, JJ., concur.