
273 S.E.2d 712 (1981)
In the Matter of ESTATE of John C. KIRKMAN, Sr., Deceased.
No. 131.
Supreme Court of North Carolina.
January 27, 1981.
*713 E. C. Harris and Randall, Yaeger, Woodson, Jervis & Stout by John C. Randall, Durham, for appellant.
Nancy Fields Fadum, Raleigh, on brief, for executor-appellee.
No appearance on behalf of appellee at oral argument.
CARLTON, Justice.

I.
The facts involved in this controversy are simple: Counsel for the widow in proceedings establishing her right to dissent from her husband's will filed petitions requesting that their fees resulting from the litigation be taxed as costs to the estate of the testator. The clerk allowed the requests and was affirmed by the trial court which concluded, "as a matter of law that a proceeding *714 to determine the right of dissent from a will by a surviving spouse is a proceeding within the meaning of North Carolina General Statutes 6-21(2), such matter being a proceeding which fixes the rights and duties of the parties under a will." The executor appealed to the Court of Appeals. That court reversed, holding that a proceeding under Chapter 30 is "beyond the purview of G.S. 6-21(2)." We allowed discretionary review on 16 September 1980.

II.
The question dispositive of this appeal is whether G.S. 6-21(2) empowers a trial court, in its discretion, to award attorneys' fees to attorneys for a spouse who has sought to establish a right to dissent from the deceased spouse's will, as allowed by Chapter 30 of the North Carolina General Statutes. G.S. 6-21 vests in a trial court the discretion to tax costs against either party in certain specified instances. In relevant part, G.S. 6-21 provides that costs may be taxed when the proceedings are:
(2) Caveats to wills and any action or proceeding which may require the construction of any will or trust agreement, or fix the rights and duties of parties thereunder; provided, however, that in any caveat proceeding under this subdivision, if the court finds that the proceeding is without substantial merit, the court may disallow attorneys' fees for the attorneys for the caveators.
G.S. § 6-21 (Cum.Supp.1979) (emphasis added). "Costs" that may be assessed include "reasonable attorneys' fees in such amounts as the court shall in its discretion determine and allow ...," G.S. § 6-21(11) (Cum.Supp. 1979), giving the trial court broad discretion to fix reasonable attorneys' fees and tax and apportion court costs among the parties. Id.; accord, Godwin v. Trust Co., 259 N.C. 520, 131 S.E.2d 456 (1963). Such costs may be assessed against any party, including the executor of a testator's estate. McWhirter v. Downs, 8 N.C.App. 50, 173 S.E.2d 587 (1970). Thus, in the case sub judice, the order taxing the dissenting spouse's attorneys' fees against the executor of her deceased husband's estate was proper only if an action to establish the right to dissent is "[an] action or proceeding which may require the construction of [a] will ..., or fix the rights and duties thereunder," G.S. § 6-21(2).
The right to dissent, which Mrs. Kirkman has now established by companion litigation, is statutory. To establish the right to dissent, a spouse must make a timely filing pursuant to G.S. 30-2, and must show an entitlement to that right under G.S. 30-1. The right to dissent is a matter of mathematical determination. In re Estate of Connor, 5 N.C.App. 228, 168 S.E.2d 245 (1969). A surviving spouse has a right to dissent only when the total value of property received under and outside the will is less than what he or she would have received had the deceased spouse died intestate. Phillips v. Phillips, 296 N.C. 590, 252 S.E.2d 761 (1979). Any determination and establishment of value made as provided in G.S. 30-1 is binding only for purposes of determining whether there is a right of dissent. G.S. § 30-1(c) (1976).
Although Chapter 30 does provide a straightforward formula for determining the right to dissent, it is clear that evaluating the relative rights of the surviving spouse will not always be an easy task. In Phillips this Court recognized the complexities of estimating the amount and value of property passing to the dissenting spouse within and without the will. Chief Justice Sharp, writing for the Court, noted that "no judicially imposed solution can adequately redress the problems of valuation raised by our dissent statutes." Phillips v. Phillips, 296 N.C. at 604, 252 S.E.2d at 770. What we must determine is whether, recognizing the potential complexity of litigation to determine a right to dissent, the Legislature intended that attorneys' fees should be awarded to attorneys for the dissenting spouse in the discretion of the trial court.
In construing the scope of G.S. 6-21(2), we must, as is always the case in statutory interpretation, ascertain and adhere to the intent of the Legislature. In re *715 Hardy, 294 N.C. 90, 240 S.E.2d 367 (1978). In attempting to ascertain the legislative intent, courts resort first to the words of the statute. Stevenson v. City of Durham, 281 N.C. 300, 188 S.E.2d 281 (1972). Legislative intent may also be ascertained from the nature and purpose of the statute and the consequences which would follow from a construction one way or another. Campbell v. Church, 298 N.C. 476, 259 S.E.2d 558 (1979). "A construction which operates to defeat or impair the object of the statute must be avoided if that can reasonably be done without violence to the legislative language." State v. Hart, 287 N.C. 76, 213 S.E.2d 291 (1975). The words and phrases of a statute must be interpreted contextually, in a manner which harmonizes with the underlying reason and purpose of the statute. In re Hardy, 294 N.C. 90, 240 S.E.2d 367 (1978).
In Hicks v. Albertson, 284 N.C. 236, 200 S.E.2d 40 (1973), this Court considered whether G.S. 6-21.1 empowered a trial judge to award attorneys' fees where an action was settled before proceeding to trial. G.S. 6-21.1 provided:
In any personal injury or property damage suit * * * instituted in a court of record, where the judgment for recovery of damages is two thousand dollars ($2,000.00) or less, the presiding judge may, in his discretion, allow a reasonable attorney fee to the duly licensed attorney representing the litigant obtaining a judgment for damages in said suit, said attorney's fee to be taxed as part of the court costs.[1] (Emphasis added.)
The obvious purpose of the statute is to provide relief for persons whose damage claims would be so small as to perhaps be economically unfeasible if they had to pay an attorney out of their recovery. Consequently, in Hicks we held that, despite the possible implication raised by the term "presiding judge," the Legislature intended that attorneys' fees be awarded, subject to the discretion of the trial judge, even when a case was settled prior to trial. Moreover, we further stated that G.S. 6-21.1 was a remedial statute, and thus "should be construed liberally to accomplish the purpose of the Legislature and to bring within it all cases fairly falling within its intended scope." 284 N.C. at 239, 200 S.E.2d at 42. Such a rule of construction applies with equal force in determining the scope of G.S. 6-21(2).
Considering the language of 6-21(2), we note especially that attorneys' fees may be awarded in "any action or proceeding which may require the construction of any will." The Court of Appeals held that a proceeding to determine the right to dissent merely involves a valuation of the property transferred under the will and "does not require a construction of the provisions of the will itself," because the dissent proceeding does not "determine what, if any, property is passed by [the will]."
While the valuation of the property passing under the will to the surviving spouse is binding only for the purposes of the dissent action and does not, of itself, establish what property will ultimately pass under the will, we do not find this to be determinative. The valuation process is not independent of "construction" of a will. Reference to the will is obviously an integral part of the process. Indeed, the very purpose of a dissent proceeding is to determine whether the surviving spouse's share under the will is more or less than under the laws of intestate succession. Valuation of the spouse's interest under the will requires a construction of the will itself; it is irrelevant that the construction reached in a dissent proceeding will not control the distribution of property under the will. It is the necessity of construction that is important, not the resulting distribution.
This conclusion seems consistent with the legislative intent underlying G.S. 6-21(2). The statutory right of dissent, "which was intended to provide a relatively simple process of determining the right to dissent, will *716 in many cases prove to be complex, time-consuming, and expensive. An unintended effect of these drawbacks may be to discourage a deserving spouse from exercising the right to dissent." Phillips v. Phillips, 296 N.C. at 604-05, 252 S.E.2d at 770. A spouse who wishes to establish that he or she is entitled to dissent from a will should not be discouraged from doing so by the potential expense involved. G.S. 6-21(2) was enacted to ensure that parties having meritorious challenges to a will or trust agreement would not be discouraged from pressing these claims by the spectre of incurring legal fees.
Interpreting G.S. 6-21(2) as allowing a trial judge the discretion to award attorneys' fees to a spouse who seeks to establish a right to dissent seems to us also consistent with the general legislative intent of that section: that proceedings which necessarily require the construction of the terms of a will should not, if meritorious, be discouraged. Where a surviving spouse is forced to engage in litigation to determine whether a right of dissent exists, we hold that the discretionary power given the trial judge under G.S. 6-21(2) includes the power to award attorneys' fees for the surviving spouse when, in the opinion of the trial court, the proceeding was one with substantial merit. Accordingly, the decision of the Court of Appeals is reversed. This cause is remanded to the Court of Appeals with the direction that the order of the trial court be reinstated.
Reversed and Remanded.
MEYER, J., took no part in the consideration or decision of this case.
NOTES
[1]  In 1979, G.S. 6-21.1 was amended by substituting "five thousand dollars ($5,000)" for "two thousand dollars ($2,000)."
