
358 N.W.2d 506 (1984)
MERCY HOSPITAL OF WILLISTON, a non-profit domestic corporation, Petitioner, Appellee and Cross-Appellant,
v.
Lester F. STILLWELL, Personal Representative of the Estate of Erling B. Manger, Deceased, and First Lutheran Church, Respondents,
Bethel Lutheran Home for the Aged, Respondent, Appellant and Cross Appellee.
Civ. No. 10683.
Supreme Court of North Dakota.
November 28, 1984.
Richard A. McKennett [argued], of Rolfstad, Winkjer, McKennett, Kaiser, Stenehjem & Walters, Williston, for respondent, appellant and cross-appellee.
Terry P. Lorenz [argued], of McIntee & Whisenand, Williston, for petitioner, appellee and cross-appellant.
GIERKE, Justice.
This is an appeal by Bethel Lutheran Home for the Aged, Inc., [Bethel], a residuary devisee under the will of Erling B. Manger, from a memorandum and order of the County Court of Williams County construing the will. The county court concluded that the residuary devise made to Good Samaritan Hospital Association [Good Samaritan], *507 an entity no longer in existence, had lapsed. It ordered distribution among the three remaining devisees (First Lutheran Church, Mercy Hospital, and Bethel) in proportion to their interests in the residue, pursuant to § 30.1-09-06(2) of the North Dakota Century Code. Mercy Hospital cross-appeals from the memorandum and order, contending that the devise to the nonexistent Good Samaritan facility should pass to Mercy Hospital alone rather than to the three remaining devisees in proportion to their interests in the residue. In the alternative, Mercy Hospital asks this court to affirm the lower court's distribution of the devise pursuant to § 30.1-09-06(2), N.D.C.C. We reverse and remand.
Manger executed a will on November 8, 1968, which directed that his sister, Mildred, receive his personal property. The rest of Manger's estate was placed in trust for Mildred, with the net income therefrom payable to her. Manger's instructions were, upon Mildred's death, to terminate the trust fund and distribute the assets to certain charitable and religious organizations listed under ARTICLES IV and V of his will. According to Paragraph Seventh of ARTICLE V of Manger's will, the residue was to be apportioned as follows:
"SEVENTH: All of the rest, residue and remainder of my estate, I give, devise and bequeath as follows:
"a. Forty percent (40%) thereof to the FIRST LUTHERAN CHURCH, Williston, North Dakota to help defer [sic] the cost of a new bell tower and equipment.
"b. Twenty percent (20%) thereof to the BETHEL LUTHERAN HOME FOR AGED, Williston, North Dakota.
"c. Twenty percent (20%) thereof to GOOD SAMARITAN HOSPITAL, Williston, North Dakota.
"d. Twenty percent (20%) to MERCY HOSPITAL, Williston, North Dakota."
Manger's will did not provide for a "gift over" to another entity in the event that one of the four residuary devisees ceased to exist at the time of his death.
Good Samaritan was owned by some of the same Lutheran churches located in northwestern North Dakota which owned Bethel. Good Samaritan was an acute medical care facility which also provided some long term nursing care as an accommodation to Bethel. Mercy Hospital is strictly an acute medical care facility.
In the early 1970's, Good Samaritan was experiencing financial difficulty. This was due in part to the economic conditions at the time and also as a result of Mercy Hospital's receipt of a Certificate of Need from the State Health Council for replacing its building. It was inevitable that Good Samaritan would eventually merge with Bethel. An administrator was hired to jointly supervise Good Samaritan and Bethel. The administrator, Wayne Hanson, remains administrator of Bethel.
On June 1, 1972, a preliminary agreement was made between Good Samaritan and Mercy Hospital whereby Good Samaritan's acute care service was transferred to Mercy Hospital. A Memorandum of Agreement was executed which finalized the transfer to Mercy Hospital in April of 1973. Good Samaritan ceased operation as a medical care facility on July 1, 1973.
A plan of merger between Good Samaritan and Bethel was executed on March 11, 1974. The plan was incorporated into the articles of merger which were adopted on March 13, 1980. The plan to merge recited, in pertinent part, that:

"RECITALS
"WHEREAS, the Good Samaritan Hospital Association was organized to own and operate a hospital by the American Lutheran Church, said hospital to be located in Williston, North Dakota, and
"WHEREAS, the corporate existence of the Good Samaritan Hospital Association is no longer practical inasmuch as the hospital which it owned and operated has closed its doors and is no longer located or operated in Williston, North Dakota, or elsewhere, and
"WHEREAS, The Bethel Lutheran Home For The Aged, Inc., is a similar *508 non-profit corporation owned and operated by the same American Lutheran Church as those owning the Good Samaritan Hospital Association, and
"WHEREAS, the corporate purpose for the Bethel Lutheran Home For The Aged, Inc., is the care of the aged, elderly and those requiring nursing care desiring to reside in Williston, Williams County, North Dakota, and
"WHEREAS, the purposes and needs of the Bethel Lutheran Home For The Aged, Inc., and the Good Samaritan Hospital Association are similar in nature and of a humanitarian nature, and
"WHEREAS, there may be gifts bequests and legacies which are as of now unknown, but which have been made to the Good Samaritan Hospital Association that could not be claimed by that corporation if it ceases to exist but which would inure to the benefit of the persons to be served and those in need located in Williston, Williams County, North Dakota, thru the Bethel Lutheran Home For The Aged, Inc.
"IT IS THEREFORE RESOLVED and the agreement of the parties hereto that the Good Samaritan Hospital Association should be merged into and become a part of the Bethel Lutheran Home For The Aged, Inc., so that the Bethel Lutheran Home For The Aged, Inc., shall be a surviving corporation and that the corporate existence of the Good Samaritan Hospital Association shall cease, and that the Bethel Lutheran Home For The Aged, Inc., shall become the owner without other transfer of all of the rights and property of the corporations herein and that it shall become subject to all of the debts and liabilities of the constituent corporations in the same manner as if Bethel Lutheran Home For The Aged, Inc., had itself incurred them ...."
Manger's sister, Mildred, moved into Bethel Home in 1974. Manger himself resided there from March of 1977 until his death on June 9, 1982. Lester Still well was appointed personal representative of the estate. Manger's will was admitted to formal probate on June 24, 1982, in the Williams County Court.
On July 28, 1983, Mercy Hospital petitioned the Williams County Court for a construction of Manger's will. Mercy Hospital contended that the court should have invoked the cy-pres doctrine and ordered that the residuary devise to Good Samaritan be distributed to Mercy Hospital, the only remaining hospital in the area providing acute medical care. In the alternative, Mercy Hospital asked the court to apply § 30.1-09-06(2), N.D.C.C., thereby distributing the Good Samaritan's devise to the three remaining devisees in proportion to their interests in the residue.
Bethel contended that it was entitled to the devise by virtue of the merger between Bethel and Good Samaritan. The lower court held that § 30.1-09-06(2), N.D.C.C., governed the disposition of the devise and ordered that it be divided in accord with the remaining devisees' proportionate interests in the residue. This appeal by Bethel followed.
The parties advance three possible solutions to the problem raised in this case:
1. Application of the anti-lapse statute, § 30.1-09-06, N.D.C.C.
2. Application of the merger statute, § 10-25-06, N.D.C.C.
3. Adoption of the cy-pres doctrine.
Mercy Hospital, in its cross-appeal, argues that the equitable cy-pres doctrine applies, asserting that Manger evidenced a general charitable intent in devising the residue of his estate in part to Good Samaritan, an acute medical care facility. Mercy Hospital contends that Manger's intent will be frustrated if the devise passes to Bethel, because Bethel provides different services and serves a different purpose than Good Samaritan did. In the alternative, Mercy Hospital asks the court to affirm the lower court's application of § 30.1-09-06(2), N.D.C.C., in apportioning the devise among the three remaining devisees. Appellant Bethel contends that the statute on merger controls the disposition of the devise to Good Samaritan.


*509 I.
The dispositive question in this appeal is whether or not the residuary devise to Good Samaritan lapsed. Section 30.1-09-06(2), N.D.C.C., provides that if a gift fails for any reason, it passes to the other residuary devisees in proportion to their interests in the residue:

"30.1-09-06 [U.P.C. 2-606]. Failure of testamentary provision 1....
"2. Except as provided in section 30.1-09-05, if the residue is devised to two or more persons and the share of one of the residuary devisees fails for any reason, his share passes to the other residuary devisee, or to other residuary devisees in proportion to their interests in the residue."
The county court concluded that Manger's intent in devising 20 percent of his residuary estate to Good Samaritan could not be carried out because Good Samaritan no longer existed at the time of the testator's death. The court, therefore, applied § 30.1-09-06(2) to save the devise by apportioning it among the remaining residuary devisees in proportion to their interests in the residue. We do not agree with the county court's determination that a lapse has occurred.
The residuary devise to Good Samaritan is a charitable gift. A charitable gift is defined as a gift designed to accomplish an objective which is beneficial to the community. Restatement (Second) Trusts § 368. Charitable objectives include, but are not limited to, the promotion of health and the advancement of religion. Restatement, supra. Although Manger expressed no specific charitable objective for his gift to Good Samaritan, it is generally held that the making of a gift to a charitable organization itself constitutes a charitable objective. In re Douglass' Estate, 94 Neb. 280, 143 N.W. 299, 301 (1913). See 15 Am.Jur.2d Charities § 80, and cases cited therein. In the instant case, all four residuary donees are "charitable corporations". As defined in Black's Law Dictionary, 5th Ed.1979, a charitable corporation is a nonprofit corporation organized for a charitable purpose such as promoting the welfare of mankind in a community or at large.
It is well recognized that charitable gifts are favored by the law and by the courts. In re Hagan's Will, 234 Iowa 1001, 14 N.W.2d 638, 642 (1944). Courts will give effect to charitable gifts where it is possible to do so consistent with recognized rules of law. Maxcy v. City of Oshkosh, 144 Wis. 238, 128 N.W. 899, 909 (1910); In re Estate of Rood, 41 Mich.App. 405, 200 N.W.2d 728, 738 (1972). See Annot., 50 A.L.R.3d 1116, 1120 (1973).
While it may be argued that the anti-lapse statute, § 30.1-09-06(2), N.D.C.C., was designed to alleviate the harsh consequences resulting from a lapse, we prefer to avoid a lapse altogether.

II.
A split in authority exists on whether or not a lapse occurs when a devise is given to a corporation which later merges with another. Some courts hold that a devise to a corporation lapses where the beneficiary ceases to exist before the testator's death. In re Estate of Staab, 173 N.W.2d 866, 871 (Iowa 1970); Industrial Nat. Bank v. Glocester Manton F. Pub. Lib., 265 A.2d 724, 727 (R.I.1970); Greil Memorial Hospital v. First Ala. Bank, 387 So.2d 778, 781 (Ala.1980); See 96 C.J.S. Wills § 1207.
Other courts take the position that a lapse does not result when a residuary devise is made to a corporation which has merged with another. In re Estate of Trimmer, 29 Ill.App.3d 209, 330 N.E.2d 241, 243-244 (1975); In re Estate of Fuller, 10 Ill.App.3d 460, 294 N.E.2d 313, 315 (1973); First Nat. Bank v. General Assembly Mission, 610 S.W.2d 927, 929 (Ky.Ct.App.1981); Fidelity Union Trust Co. v. Ackerman, 18 N.J.Super. 314, 87 A.2d 47, 51 (1952).
The view of the Restatement (Second) of Trusts (Rev.) § 397, Comment g., is as follows:
"g. Gift to charitable corporation which has not capacity to take or hold. If a testator devises or bequeaths property *510 to a charitable corporation which has not capacity to take and hold the property, the disposition will not fail if the testator manifested an intention to devote the property to charitable purposes and not merely to make a gift to the particular corporation. This is true whether the gift to the corporation fails because ... or because the corporation has ceased to exist." [Emphasis added.]
In the instant case we have concluded that Manger evidenced a charitable objective by bequeathing and devising the residue of his estate to four nonprofit corporations.
The Restatement view is in accord with the principle that the merger of a corporation does not terminate a charitable trust of which the corporation is a beneficiary, as long as the purposes for which the trust was created are not impaired. 15 Am.Jur.2d Charities § 141; Re Trust of Bodine, 429 Pa. 260, 239 A.2d 315, 317 (1968); In re Estate of Kellogg, 33 A.D.2d 388, 307 N.Y.S.2d 907, 911 (N.Y.App.Div.1970). We are convinced that this principle is applicable to charitable gifts as well as charitable trusts.
The court in Re Trust of Bodine, supra 239 A.2d at 316-317, relied on the above principle in determining that the trust funds in that case inured to the surviving corporation as a matter of law:
"... the consolidated corporation or the surviving corporation as the case may be will be entitled to receive the trust funds as a matter of law, unless the settlor evidences a different intention."
We determine that § 10-25-06(4), N.D.C.C., provides for a legal disposition of the devise in this case:
"10-25-06. Effect of merger or consolidation. When such merger or consolidation has been effected:
. . . . .
"4. Such surviving or new corporation shall thereupon and thereafter possess all the rights, privileges, immunities, and franchises, as well of a public as of a private nature, of each of the merging or consolidating corporations. All property, real, personal, and mixed, and all debts due on whatever account, and all other choses in action, and all and every other interest, of or belonging to or due to each of the corporations so merged or consolidated, shall be taken and deemed to be transferred to and vested in such single corporation without further act or deed. The title to any real estate, or any interest therein, vested in any of such corporations shall not revert or be in any way impaired by reason of such merger or consolidation." [Emphasis added.]
We conclude that the above-italicized language encompasses a devise to a corporation, which corporation later merges with another.
As the court in Bodine points out, the surviving corporation is entitled to the charitable trust as long as the settlor's intent is carried out. Bodine, supra 239 A.2d at 317. The testator's intent at the time he executed his will is the primary consideration in the instant case. In re Glavkee's Estate, 76 N.D. 171, 34 N.W.2d 300, 304-305 (N.D.1948); Hitz v. Estate of Hitz, 319 N.W.2d 137, 139 (N.D.1982). Section 30.1-09-03, N.D.C.C., specifically provides that:
"30.1-09-03 [U.P.C. 2-603]. Rules of construction and intention.The intention of a testator as expressed in his will controls the legal effect of his dispositions...."
Erling B. Manger, in his will, made a number of specific bequests and devises of a charitable nature which were to take effect upon termination of the trust set up for Mildred. The residue of his estate was to be divided as specified among four nonprofit entities, namely: First Lutheran Church, Bethel Lutheran Home for Aged, Good Samaritan Hospital, and Mercy Hospital, all of Williston. Manger failed to provide for a gift over in the event that one of the above-mentioned entities ceased to exist. He was aware that Good Samaritan would merge with Bethel. Once Manger learned *511 of the merger plans, he could have revised his will had he so desired. Thus, our holding that the Good Samaritan devise passes to Bethel does not frustrate Manger's charitable intent.
One of the presumptions applied in cases involving interpretation of a will is that a testator is presumed to know the laws of the State which may have some bearing on the disposition of his estate. In Re Hunter's Estate, 129 Neb. 529, 262 N.W. 41, 45 (1935); Maxcy v. City of Oshkosh, supra 128 N.W. at 907. See 80 Am.Jur.2d Wills § 1179, and cases cited therein. Thus, under this presumption, Manger is deemed to have known that the corporate merger statute could affect his residuary devise to Good Samaritan.
Mercy Hospital argues that the devise should not pass to Bethel pursuant to the corporate merger statute because the services provided by the two entities were so dissimilar. Mercy Hospital contends that Manger intended his gift to pass to a hospital which is organized for providing acute medical care rather than to Bethel, a retirement home which specializes in long term custodial care. It is true, as Mercy Hospital asserts, that automatic application of § 10-25-06, N.D.C.C., to testamentary gifts given to two totally dissimilar entities which have merged may lead to absurd results. In the instant case, however, Bethel and Good Samaritan were not so dissimilar in purpose and effect that Bethel's receipt of the devise would frustrate Manger's intent.
The transcript of proceedings reveals that, after the merger, Bethel continued to supply services that were formerly provided by Good Samaritan. Good Samaritan had never limited its services to acute medical care. One wing of Good Samaritan had been specifically considered an arm of Bethel in providing skilled nursing care. Therefore, we disagree with Mercy Hospital's assertion that the dissimilarity between Bethel and Good Samaritan renders the merger statute inapplicable.
We conclude that the corporate merger statute, § 10-25-06(4), N.D.C.C., controls the disposition of the residuary devise to Good Samaritan in that said devise in no way frustrates the charitable intent of the testator, Manger.

III.
Appellee and cross-appellant Mercy Hospital urges this court to adopt the cy-pres doctrine, which has been applied in a number of jurisdictions in an effort to effectuate a testator's intent when a charitable gift or devise has lapsed. Because we have already concluded that a lapse has not occurred in the instant case, we need not consider the applicability of the cy-pres doctrine.
The order contained in the court's memorandum is reversed and the case remanded to the county court with instructions to distribute the devise in accordance with this opinion.
ERICKSTAD, C.J., and PEDERSON and SAND, JJ., concur.
VANDE WALLE, Justice, concurring specially.
I concur in the result because I believe the result effectuates the testator's intent. In so doing, I do not rely upon Section 10-25-06, N.D.C.C.
