This is an appeal by the heirs-at-law of the late Kathryn B. Orstein challenging the trial court’s construction of decedent’s last will and testament. At issue is whether under the terms of the will decedent’s estate passed to a relative of her ex-husband.
The relevant facts are not in dispute. Kathryn B. Orstein married W. Lee Orstein in 1966. On August 30, 1978, she executed a will which reads in part as follows:
I— I direct the payment of all my just debts and funeral expenses out of my estate as soon as may be practical after my death.
II— I devise and bequeath all of my estate of whatever nature and wherever situate unto my husband, W. Lee Orstein.
III— Should my said husband predecease me, then I devise and bequeath all of my estate of every nature and wheresoever situate unto my issue per stirpes.
IV— If my said husband predeceases me and we have no issue, then all of my estate shall be distributed to my husband’s uncle, Stanley Selfon.
V— I appoint my husband, W. Lee Orstein, Executor of this, my Last Will and Testament. Should my said husband fail to qualify or cease to act as such, then I appoint the said Stanley Selfon to act in this capacity. Neither of my personal representatives shall be required to post bond in this or any jurisdiction.
*286The Stanley Selfon referred to in the final two paragraphs is the husband of W. Lee Orstein’s aunt, and thus W. Lee Orstein’s uncle by marriage.
The Orsteins divorced in 1981. Decedent, however, did not revise her will. She died without issue on February 25, 1984. She was survived by both W. Lee Orstein and Stanley Selfon.
The parties to this suit agree that — as decedent’s ex-husband — W. Lee Orstein is barred by operation of law from receiving a bequest or serving as an executor. See 20 Pa.Cons.Stat.Ann. § 2507(2) (Purdon 1975) (discussed infra ). Paragraph II of the will is therefore ineffective. The parties also agree that since decedent had no issue paragraph III of the will is ineffective. The present controversy concerns Mr. Selfon’s rights under paragraph IV.
On March 20, 1984, the will was admitted to probate and letters testamentary were issued to Mr. Selfon. Selfon administered the estate as executor. Pursuant to paragraph IV, he distributed the entire proceeds of the estate to himself.
On June 17, 1985, decedent’s sister Elizabeth, her sister Mary, and her brother John filed an action for declaratory relief in the Orphan’s Court Division of the Court of Common Pleas of Cumberland County. Plaintiffs (here appellants) alleged that they are the sole intestate heirs of the decedent. They argued that the paragraph IV bequest to Mr. Selfon was subject to a condition precedent that W. Lee Orstein predecease Kathryn B. Orstein; since Mr. Orstein was still alive, they reasoned that this condition had not been satisfied and that a total intestacy resulted. Following a hearing, the Honorable Kevin A. Hess issued an order denying relief. Plaintiffs-appellants filed post-trial motions which were denied and then appealed to this court.
We deal here with a “gift over” — a gift to an alternate beneficiary (Selfon) designed to take effect if the will’s primary beneficiary (W. Lee Orstein) dies during the testatrix’s lifetime. The precise issue on appeal is whether the trial court committed an error of law by enforcing the gift *287over where: (1) the primary beneficiary was the testatrix’s former spouse, and (2) this spouse did not die but rather was divorced. This is a question of first impression for an appellate court in Pennsylvania.1 After careful consideration, we conclude that the trial court did not err and we affirm.
We will first discuss the general problem of interpreting a gift over within the context of a subsequent divorce. We will then proceed to consider a special complication — the fact that the gift over will go to a relative of the testatrix’s ex-spouse.
I.
Reduced to its essentials, decedent’s will provides that she leaves everything to her husband, and if he predeceases her, then to the alternate beneficiary. This is certainly a common testamentary plan. In the early part of the century, the probate of such a will would have presented little difficulty; in Jones’s Estate, 211 Pa. 364, 60 A. 915 (1905), the Court held that divorce did not affect the right of the former spouse to take under a will. Thus, in the Jones era, the ex-spouse would have received the bequest and the rights, if any, of the alternate beneficiary would have remained a moot question.
In 1947, however, Pennsylvania became one of many states to adopt a statutory provision based on section 53 of the Model Probate Code. This provision as currently revised is codified as section 2507(2) of the state Decedents, Estates and Fiduciaries Code:
*288If the testator is divorced from the bonds of matrimony after making a will, all provisions in the will in favor of or relating to his spouse so divorced shall thereby become ineffective for all purposes.
The provision clearly disqualifies the ex-husband from receiving the estate. Consequently, the probate court is faced with a choice of upholding the distribution to the alternate beneficiary or of declaring an intestacy.
At this point, it is useful to recall certain general principles of wills construction. First, the primary goal of the court is to effectuate the intent of the testatrix. The intent of the testatrix is of central importance and such intent may be denied only where it is unconstitutional, unlawful or against public policy. In re Estate of Janney, 498 Pa. 398, 446 A.2d 1265 (1982). Except where a statute dictates a contrary result, the court must respect a testatrix’s wishes even when they conflict with the best interest of her own family. See Estate of Stewart, 325 Pa.Super. 545, 473 A.2d 572 (1984), aff'd 506 Pa. 336, 485 A.2d 391 (1984).
Second, testamentary intent can only be ascertained by carefully reviewing all of the language contained in the will. In re Estate of Ogden, 353 Pa.Super. 273, 276, 509 A.2d 1271, 1273 (1986). “[T]he words of the instrument are not viewed in a vacuum,” ibid., but rather as part of an overall testamentary plan. See Estate of Zerbey, 313 Pa. Super. 297, 459 A.2d 1237 (1983). This does not mean that the court may ignore the text of the will in favor of extrinsic evidence or rewrite the will for the testatrix. See In re Estate of Macfarlane, 313 Pa.Super. 397, 459 A.2d 1289 (1983). However, specific “[w]ords or phrases will be rejected when they ... subvert or defeat testator’s whole testamentary scheme and divest the bounty from those whom he obviously intended to benefit ...” Hill Estate, 432 Pa. 269, 279, 247 A.2d 606, 612 (1968) (citing March Estate, 357 Pa. 216, 219, 53 A.2d 606, 607 (1947)).
Third, if the decedent’s intent is unclear, certain presumptions are applied to the construction of the will. “First *289among these presumptions is that a testator intends to dispose of his entire estate and not to die intestate as to any part of it.” Estate of Williams by Lorgan v. Williams, 357 Pa.Super. 476, 480, 516 A.2d 359, 361 (1986).2 Moreover, and more generally, “the law will impute to the testator’s words such meaning as under all the circumstances will conform to his probable intention and be most agreeable to reason and justice.” Estate of McKenna, 340 Pa.Super. 105, 110, 489 A.2d 862, 865 (1985).
In the instant case, appellants view the words “if my spouse predeceases me” as imposing an absolute requirement that the former spouse die before the testatrix. These words, however, may also be viewed as part of a broader scheme, i.e., a method by which the testatrix describes her order of preference regarding who should enjoy her estate. It is overwhelmingly likely that the only reason for the predecease clause was to provide a fallback beneficiary in case the husband was no longer available to take under the will. Once the husband is barred by divorce from taking the gift, the time of his death no longer has any apparent significance. Therefore, as the trial judge noted in his opinion, “[cjommon sense, in part, impels us to the conclusion that [the predecease clause] ... is less a pre-condition and more a provision to address the situation where the primary beneficiary could or would not [take under the will]...” Trial Ct. Op. at 5.
In reaching this determination, we are guided by the decisions in other jurisdictions which have dealt with the issue at hand. See generally Annotation, Divorce: Devolution of Gift Over Upon Spouse Predeceasing Testator Where Gift to Spouse Fails Because of Divorce, 74 A.L. R.3d 1108 (1976). Several opinions have interpreted surviv*290orship clauses as barring recovery3, but the majority of cases in states which have adopted provisions similar to Pennsylvania’s code section 2507(2) have upheld the alternate bequest.4 Although the precise reasoning of the courts varies, the underlying policy was aptly summarized by the Wisconsin Supreme Court:
... a testator probably intends that a gift over be given effect whenever the spouse cannot take whatever the reason. Since divorce takes the spouse out of the picture as surely as death, it does not seem logical to tie the disposition of the estate to the death of the divorced spouse who is no longer a qualified beneficiary. The effect of [a contrary] rule of construction is to give preference to the law of intestacy over a testamentary dispositional scheme.
In re Estate of Graef, 124 Wis.2d 25, 38, 368 N.W. 633, 639 (1985).
We also note that this view is in accord with the Uniform Probate Code (U.P.C.). Section 2-508 of the U.P.C. provides in part:
If after executing a will the testator is divorced or his marriage annulled, the divorce or annulment revokes any *291disposition or appointment of property made by the will to the former spouse, any provision conferring a general or special power of appointment on the former spouse, and any nomination of the former spouse as executor, trustee, conservator, or guardian, unless the will expressly provides otherwise. Property prevented from passing to a former spouse because of revocation by divorce or annulment passes as if the former spouse failed to survive the decedent, and other provisions conferring some power or office on the former spouse are interpreted as if the spouse failed to survive the decedent.
Although our state statute is less comprehensive, we cannot conclude that the Pennsylvania legislature has implicitly rejected the U.P.C. position. Cf. Porter v. Porter, 286 N.W.2d 649, 656 (Iowa 1979) (Iowa legislature did not implicitly reject U.P.C. by retaining provision based on section 53 of Model Probate Code). Pennsylvania adopted what is now code section 2507(2) over twenty years before the U.P.C. was promulgated by the National Conference of Commissioners on Uniform State Laws and approved by the American Bar Association in 1969. Since section 2507(2) is silent as to the rights of the alternate beneficiary, nothing therein is inconsistent with the result that we reach today.
In summary, there are two ways of interpreting the words “if my spouse predeceases me” (or “if my spouse does not survive me”) when they appear in a will. This clause may indicate that unless the spouse actually outlives the testatrix, the gift to the alternate beneficiary is void under all circumstances. Or the clause may express an intention that the gift should go first to the spouse, if possible, and then to another.
Each will is a unique testamentary document. “[N]o will has a twin brother,” Henderson Estate, 405 Pa. 451, 455, 176 A.2d 428, 430 (1962), and one cannot assume that all decedents mean the same thing by the same language. However, we are inclined to prefer the broader construction since this reading avoids an intestacy and is more likely to reflect the testatrix’s wishes. Therefore, in the absence of *292clear evidence of an intent to the contrary, property which is prevented from passing to a former spouse because of divorce should pass in the same manner as if the former spouse had failed to survive the decedent.5 Cf. Jones v. Brown, 219 Va. 599, 248 S.E.2d 812 (1978); First Church of Christ, Scientist v. Watson, 286 Ala. 270, 239 So.2d 194 (1970) (similar reasoning).
II.
Upon reviewing the Orstein will, we conclude that there is no special factor which counsels in favor of declaring an intestacy. Decedent established a simple formula for distributing her estate — first to husband, then to issue, then to appellee Selfon. We will follow this formula to the extent that it is possible to do so.
The one truly unusual aspect of decedent’s will is the identity of the last named beneficiary. Selfon is of course decedent’s ex-spouse’s uncle. At first blush, this appears to create a substantial problem.
A decedent will sometimes leave her estate to her spouse with a gift over to a charity or to a favorite member of her own family. See In re Estate of Fredericks, 311 So.2d 376 (Fla.Dist.Ct.App.1975) (gift over to hospital); Iles v. Iles, 158 Fla. 493, 29 So.2d 21 (1947) (gift over to testator’s brother). In such a case, it is particularly likely that failing to enforce the gift over after the decedent has been divorced would thwart her intent. One would not expect the divorce to have any impact on her feelings toward the alternate beneficiary.
On the other hand, where the gift over is to the spouse’s relative, the divorce takes on added significance. Following the divorce, testatrix may drift apart from the ex-spouse’s family and may become closer to those individu*293als who are her intestate heirs. We conclude however that this possibility does not justify interfering with the bequest to Selfon.
The law contains no general presumption against gifts to an ex-spouse’s relatives. Section 2507(2) reflects a legislative judgment that the average decedent would wish to change “all provisions in the will in favor of or relating to his spouse so divorced”; the General Assembly saw no need to protect the decedent by also invalidating provisions in the will in favor of or relating to the divorced spouse’s kin. If the Orstein will had contained a direct and exclusive gift to appellee — e.g., “I leave $50,000 to my husband’s uncle Stanley” — this gift would surely be enforced.6 It follows that divorce alone is not sufficient reason to avoid a will construction which permits an alternate bequest to Selfon.
Moreover, on a practical level, “[tjhere is no reason to assume that in all or even most cases a testator estranged from his spouse will also be estranged from alternative beneficiaries under the will, even if they are relatives of that spouse.” Porter v. Porter, 286 N.W.2d at 655. In the instant case, testatrix did not mention her intestate heirs at all; she mentioned appellee twice — as an alternate beneficiary in paragraph IV of the will and as an alternate executor in paragraph V. New individuals who execute a will would choose of all people a husband’s uncle — rather than their own brother and sisters — as an object of their *294bounty. Such a disposition would seem to evidence an exceptionally close bond — a bond which may well outlast the end of the marriage. Families, after all, are comprised of individuals and individuals form relationships in patterns which cannot always be neatly regulated or predicted. We shall not disturb the pattern that this will reflects.
Order affirmed.