
747 N.W.2d 106 (2008)
2008 ND 67
Clifford and Ruth OYLOE, Appellants
v.
NORTH DAKOTA DEPARTMENT OF HUMAN SERVICES, Appellee.
No. 20070251.
Supreme Court of North Dakota.
April 17, 2008.
*108 Damian J. Huettl, Larson, Latham and Huettl, Bismarck, N.D., for appellants.
Jean R. Mullen, Office of Attorney General, Bismarck, N.D., for appellee.
MARING, Justice.
[¶ 1] Clifford and Ruth Oyloe appeal from a judgment affirming a Department of Human Services decision denying their applications for Medicaid benefits because irrevocable trust assets exceeded Medicaid eligibility limits. We conclude the Department correctly determined that the trust proceeds from the sale of the Oyloes' home were available assets to pay for their care, rendering the Oyloes ineligible for Medicaid benefits. We affirm.

I
[¶ 2] The parties stipulated to the facts. On March 26, 1993, the Oyloes established an irrevocable trust and transferred various real property interests into the trust, including their home in Williston. Steve L. Oyloe was appointed trustee. Under the general terms of the trust agreement, the Oyloes were designated the beneficiaries of the trust income during their lifetimes, and their children were designated the beneficiaries of the trust assets upon the deaths of the Oyloes. The Oyloes eventually became residents of the Bethel Lutheran Home in Williston.
[¶ 3] The trust gave the trustee discretion to sell the Oyloes' home if the Oyloes no longer resided there under paragraph 2(b), which provides:
During the joint lifetime of the Grantors, if there ever comes a time when neither of the Grantors is living in the personal residence of the Grantors transferred into trust and it is unlikely to ever be occupied by them again, the Trustee has the option to sell said personal residence and immediately distribute the proceeds from the sale in accordance with the terms of paragraph 1.(d) of this Agreement, subject only to the requirements of paragraph 4.
(Emphasis added.) The trust agreement, however, does not contain a "paragraph 1.(d)."
[¶ 4] The parties stipulated:
The Oyloes intended for the Trustee to sell the home if neither Ruth nor Clifford resided in the home. The Oyloes further intended that, after the sale of the home, the Trustee shall distribute the sales proceeds to the residuary beneficiaries of the trust. The Oyloes' attorney who assisted them with the drafting and establishment of the Trust inadvertently failed to change the dispositive provision of section 2(b) of the Trust. Specifically, the attorney failed to change the reference in section 2(b) to "paragraph l.(d)" to read, "paragraph 2.(c)."
Paragraph "2.(c)" of the trust agreement provides for distribution of trust assets to residuary beneficiaries upon the Oyloes' deaths and states:
Upon the death of the survivor of the Grantors, the Trustee shall divide the trust estate into as many equal shares as shall equal in number those of the children of the Grantors who shall be then living, and those of the children of the Grantors who shall have predeceased the surviving Grantor leaving issue then living. The Trustee shall pay *109 over and distribute outright one such equal share to the issue of each such deceased child, by representation, and one such equal share to each such child who shall be living at the death of the surviving Grantor. If there be no such children or issue of the Grantors then living, to the persons who would be entitled to inherit the same in accordance with the laws of the State of North Dakota, then in force, as if the Grantors had then died intestate, a resident of the State of North Dakota, and owning such property.
[¶ 5] On September 28, 2006, the trustee sold the Oyloes' home and the net sale proceeds of $122,498.90 were deposited into, the trust account. The Oyloes applied for Medicaid, but their applications were denied because their home and its sale proceeds were considered countable assets which exceeded Medicaid eligibility limits. The Department did not take the position that the other trust assets were countable assets for Medicaid purposes. The Administrative Law Judge ("ALJ") concluded the trust agreement was a Medicaid-qualifying trust because it failed to specify how the proceeds of the sale of the home were to be distributed before the Oyloes' deaths, and consequently, under the reasoning of Allen v. Wessman, 542 N.W.2d 748 (N.D. 1996), the home sale proceeds reverted to the Oyloes and remained available assets to pay for their care. The Department adopted the ALJ's recommendations, and the district court affirmed the Department's decision.

II
[¶ 6] On appeal, the Oyloes argue the Department erred in determining the home sale proceeds are countable assets in determining Medicaid eligibility because the terms of the trust provide for the sale proceeds to be distributed under the provisions of paragraph 2(c), which relate to distributions to residuary beneficiaries. In the alternative, they argue the Department erred in refusing to consider extrinsic evidence of their intentions for distribution of the home sale proceeds.
[¶ 7] Our standard of review of the Department's decision is the same as the standard applied by the district court under N.D.C.C. § 28-32-46. Christofferson v. North Dakota Dep't of Health, 2007 ND 199, ¶ 7, 742 N.W.2d 799. We will overturn the Department's decision only if:
1. The order is not in accordance with the law.
2. The order is in violation of the constitutional rights of the appellant.
3. The provisions of this chapter have not been complied with in the proceedings before the agency.
4. The rules or procedure of the agency have not afforded the appellant a fair hearing.
5. The findings of fact made by the agency are not supported by a preponderance of the evidence.
6. The conclusions of law and order of the agency are not supported by its findings of fact.
7. The findings of fact made by the agency do not sufficiently address the evidence presented to the agency by the appellant.
8. The conclusions of law and order of the agency do not sufficiently explain the agency's rationale for not adopting any contrary recommendations by a hearing officer or an administrative law judge.
N.D.C.C. § 28-32-46. On appeal we consider whether the agency's findings of fact are supported by a preponderance of the evidence, whether the conclusions of law are sustained by the agency's findings of fact, and whether the agency's decision is *110 supported by the conclusions of law. Christofferson, at ¶ 8. Questions of law are fully reviewable on an appeal from an administrative decision. Tedford v. Workforce Safety & Ins., 2007 ND 142, ¶ 7, 738 N.W.2d 29.

A
[¶ 8] "Medicaid is a cooperative federal-state program designed to furnish financial assistance to needy persons for their medically necessary care." Kryzsko v. Ramsey County Soc. Servs., 2000 ND 43, ¶ 6, 607 N.W.2d 237. A person must lack sufficient assets to meet the cost of necessary medical care and services to be eligible for Medicaid benefits. Estate of Pladson v. Traill County Soc. Servs., 2005 ND 213, ¶ 10, 707 N.W.2d 473. North Dakota participates in the Medicaid program and the Department has adopted rules in N.D. Admin. Code ch. 75-02-02.1 to implement the program and to determine the conditions of eligibility for Medicaid benefits. Kryzsko, at ¶ 6. The Medicaid program is intended to be the payor of last resort, and an individual's resources must be virtually exhausted before Medicaid will pay for care. Roberts v. North Dakota Dep't of Human Servs., 2005 ND 50, ¶ 7, 692 N.W.2d 922. An applicant for Medicaid benefits has the burden of proving eligibility. Id.
[¶ 9] In Estate of Pladson, 2005 ND 213, ¶ 10, 707 N.W.2d 473, we explained:
Under the Department's rules for determining Medicaid eligibility, a one-person unit is eligible for Medicaid benefits if the total value of that person's assets does not exceed $3,000. N.D. Admin. Code § 75-02-02.1-26(1)(a); Linser v. Office of Attorney General, 2003 ND 195, ¶ 7, 672 N.W.2d 643. An "asset" is defined as "any kind of property or property interest, whether real, personal, or mixed, whether liquid or illiquid, and whether or not presently vested with possessory rights." N.D. Admin. Code § 75-02-02.1-01(2). Although certain assets are exempt or excluded from consideration, see N.D. Admin. Code §§ 75-02-02.1-27 and 75-02-02.1-28, other assets that are "actually available" must be considered in determining the applicant's eligibility for Medicaid. N.D. Admin. Code § 75-02-02.1-25(1); Estate of Gross v. North Dakota Dep't of Human Servs., 2004 ND 190, ¶ 8, 687 N.W.2d 460. Assets are "actually available" under N.D. Admin. Code § 75-02-02.1-25(1) when the assets are at the disposal of the applicant, recipient, or responsible relative who has a legal interest in a liquidated sum and that person has the legal ability to make the sum available for support, maintenance, or medical care. Estate of Gross, at ¶ 8.
[¶ 10] A Medicaid-qualifying trust is considered an available asset for Medicaid eligibility purposes. See Allen, 542 N.W.2d at 754. The federal law in effect at the time the Oyloes established the trust defined a Medicaid-qualifying trust as "a trust, or similar legal device, established (other than by will) by an individual (or an individual's spouse) under which the individual may be the beneficiary of all or part of the payments from the trust and the distribution of such payments is determined by one or more trustees who are permitted to exercise any discretion with respect to the distribution to the individual." 42 U.S.C. § 1396a(k)(2) (1992); see also N.D. Admin. Code § 75-02-02.1-31(6)(a)(1). A trust that meets this definition is a Medicaid-qualifying trust "[w]hether or not the medicaid qualifying trust is irrevocable or is established for purposes other than to enable a grantor to qualify for medical assistance," or "[w]hether or not the discretion described in paragraph (2) is actually exercised." 42 U.S.C. § 1396a(k)(3) (1992); see also N.D. *111 Admin. Code § 75-02-02.1-31(6)(c). This Court has noted "the statutory definition of a Medicaid qualifying trust in 42 U.S.C. § 1396a(k) (1992) `does not require that a trustee have unbridled discretion, but indicates that any discretion to distribute assets is sufficient.'" Allen, 542 N.W.2d at 752 (quoting Gulick v. Department of Health & Rehab. Servs., 615 So.2d 192, 196 (Fla.Ct.App.1993)).
[¶ 11] The Oyloes contend the trust is not a Medicaid-qualifying trust because under the terms of the trust agreement, the trustee has the option to either distribute the home sale proceeds in accordance with nonexistent paragraph 1(d) or hold them for distribution under the residuary beneficiary provision of paragraph 2(c), and because paragraph 1(d) does not exist, the trustee is obligated to hold the proceeds for the residuary beneficiaries of the trust until the Oyloes' deaths. We reject the Oyloes' argument because it does not comport with the actual language of the trust and conflicts with this Court's precedent.
[¶ 12] Paragraph 2(b) of the trust agreement gives the trustee the option to sell the Oyloes' personal residence and "immediately distribute the proceeds from the sale in accordance with the terms of paragraph l.(d)." (Emphasis added.) The trustee is given only an option to sell or to not sell the residence. If the trustee exercises the option to sell, the trust agreement does not grant the trustee another option to hold the sale proceeds until the Oyloes deaths and then distribute the proceeds to the residuary beneficiaries. The trustee's retention of the sale proceeds for distribution to residuary beneficiaries under paragraph 2(c) would violate the requirement in paragraph 2(b) that the proceeds be "immediately" distributed.
[¶ 13] Although there is no provision in the trust agreement delineating who should receive immediate distribution of the proceeds, this Court's decision in Allen, 542 N.W.2d 748, provides guidance. In Allen, 542 N.W.2d at 750, a trust gave the trustees the discretion to terminate the trust and distribute the principal and undistributed income "as described in paragraph 2 of this trust." However, the settlor was still alive, and paragraph 2 "only direct[ed] how the trustees must distribute Trust income during Allen's life and how all assets must be distributed after Allen's death." Id. at 753. The trust did "not direct how Trust assets must be distributed if the trustees exercise their discretion to terminate the Trust during Allen's life." Id. In concluding these circumstances resulted in the trust constituting a Medicaid-qualifying trust, this Court relied on well-settled trust principles:
If a trust fails and the settlor made no provision for distribution, the trustee must restore the trust property to the settlor. V William F. Fratcher, Scott on Trusts § 411 (1989). "The cases are so numerous and the rule so well settled that it is unnecessary to cite them." Id. at n. 1 (citations to typical cases omitted). If a trust is terminated by exercise of a trustee's discretion, and the settlor has not specified "who shall receive the trust property on the termination of the trust, the trustee will ordinarily hold the trust property upon a resulting trust for the settlor or his successors in interest." IV William F. Fratcher, Scott on Trusts § 345.3, p. 555 (1989). Because Allen did not specify who should receive the Trust property if the trustees exercised their discretionary power to terminate the Trust during his life, they would then hold the property for" Allen. Thus, applying 42 U.S.C. § 1396a(k)(1) (1992), all of the Trust assets are "deemed available" to Allen. Furthermore, applying 42 U.S.C. *112 § 1396a(k)(3)(B) (1992), even if the trustees do not actually exercise their discretion to terminate the Trust during Allen's lifetime, the Trust assets are "deemed available" to Allen.
Id.
[¶ 14] The circumstances surrounding the Oyloes' trust resemble the situation in Allen. Although the trust in Allen was terminated and failed in its entirety, "[a] resulting trust [in favor of the settlor] arises not only where an intended trust fails altogether but also where it fails in part. Where the intended trust fails in part, there is a resulting trust of so much of the property as is not appropriated to the part of the trust that does not fail." V William F. Fratcher, Scott on Trusts § 411.2, p. 30 (1989). See also Ronald Chester and George G. Bogert, The Law of Trusts and Trustees § 451, pp. 280-81 (3rd ed.2005) (resulting trust arises when express trust "fail[s] in whole or in part"); 76 Am.Jur.2d Trusts § 135, p. 191 (2005) (resulting trust may arise "where an express trust fails in whole or in part"). The partial failure of the trust in this case is not a distinguishing feature that renders the Allen principles inapplicable here. Nor do we perceive a substantive difference between the reference here to a nonexistent paragraph and the failure in Allen to provide for a contingency in the trust document.
[¶ 15] The trustee in this case was given the discretionary power to sell the Oyloes' personal residence and immediately distribute the proceeds from the sale. Because the distribution provision related to the sale of the personal residence failed, a resulting trust arose in favor of the Oyloes, and all proceeds from the sale reverted to the Oyloes. The result would not differ if the trustee had not exercised his discretion to sell the home. See Allen, 542 N.W.2d at 753. Under federal and state Medicaid law, those proceeds must be considered an asset available to the Oyloes for purposes of determining their eligibility for Medicaid benefits.

B
[¶ 16] The Oyloes contend the reference to a nonexistent paragraph renders the trust ambiguous and, therefore, the Department erred in failing to consider the undisputed extrinsic evidence of the Oyloes' intentions in resolving the ambiguity.
[¶ 17] In Allen, 542 N.W.2d at 752-53, this Court rejected an identical contention:
Allen contends that the hearing officer and Department were required to consider extrinsic evidence about his intent and were bound by the county court's findings interpreting the Trust. Allen urges that his intent to preserve the Trust assets for family members is not against public policy. On the other hand, the Department takes the position that extrinsic evidence and the county court decision are irrelevant and contrary to federal law for the Medicaid program;
. . . .
The Department ruled that both Allen's intent to preserve his assets for relatives and the county court's construction of, the Trust were irrelevant to Allen's eligibility for Medicaid benefits. These rulings by the Department correctly applied the federal law. As Bleazard v. Utah Dep't of Health, 861 P.2d 1048, 1050 (Utah App.1993), explained, "State Medicaid plans must comply with federal requirements, including those regarding eligibility."
. . . .
If [Allen's] indicated intent is actually carried out, Allen will have transferred his considerable wealth to two cousins *113 and two nephews, and will have largely shifted the cost of his medical care to the public and taxpayers. This intent is against public policy.
Public policy will not allow the social safety net for persons who are old, poor, and unfortunate to be exploited by those who are affluent.
As in Allen, the Oyloes' stated intention to have the sale proceeds distributed to their children conflicts with public policy, and we conclude the Department did not err in refusing to consider this extrinsic evidence.
[¶ 18] We conclude the Oyloes' trust is a Medicaid-qualifying trust and the Department did not err in refusing their applications for benefits.

III
[¶ 19] We conclude the Department's findings of fact are supported by a preponderance of the evidence, the conclusions of law are sustained by the findings of fact, and its decision is supported by the conclusions of law. The judgment upholding the Department's decision is affirmed.
[¶ 20] GERALD W. VANDE WALLE, C.J., DANIEL J. CROTHERS, DALE V. SANDSTROM, and CAROL RONNING KAPSNER, JJ. concur.
