
833 P.2d 201 (1992)
STATE of Montana, ex rel. Patricia D. NEUHAUSEN, Petitioner and Respondent,
v.
Lawrence P. NACHTSHEIM and the Department of Administration for the State of montana, Respondents and Appellants.
No. 91-348.
Supreme Court of Montana.
Submitted on briefs November 21, 1991.
Decided June 29, 1992.
*202 Paul A. Smietanka, Dept. of Admin., Helena. for respondents and appellants.
Allan M. McGarvey, McGarvey, Heberling, Sullivan & McGarvey, Kalispell, for petitioner and respondent.
GRAY, Justice.
The appellants, Lawrence Nachtsheim and the Department of Administration, appeal from the Judgment and Peremptory Writ of Mandate entered by the District Court of the Eleventh Judicial District, Flathead County, which directed the appellants to divide Highway Patrol Retirement System (HPRS) benefits and pay one-half of those benefits directly to the respondent, Patricia Neuhausen, in accordance with a decree of dissolution of marriage. We reverse and remand.
The dispositive issue on appeal is whether the appellants have a clear legal duty to pay HPRS benefits directly to the respondent.
On August 14, 1990, the marriage between HPRS member Martin Neuhausen and Patricia Neuhausen was dissolved by entry of a Final Decree of Dissolution in Flathead County Cause No. DR-88-533(A). Pursuant to the decree, HPRS administrators were directed to issue two checks each month in payment of Martin's disability retirement benefits. One check, representing *203 one-half of the benefits, was to be paid directly to Martin; the second check was to be issued directly to Patricia.
Subsequent to the August 14, 1990 dissolution decree, Patricia's former attorney contacted the Public Employees' Retirement Division (Division) of the Department of Administration to arrange for the issuance of two drafts on the HPRS pension fund account in accordance with the terms of the dissolution decree. The Division's administrator, Lawrence Nachtsheim, refused to issue separate checks, asserting that the Division was statutorily prohibited from making such a disbursement.
On November 30, 1990, an Amended Final Decree of Dissolution was entered which also contained provisions to divide Martin's disability retirement benefits and for the issuance of separate checks. On March 11, 1991, the Division received correspondence from Patricia's present attorney demanding conformity with the Amended Final Decree of Dissolution. The Division refused, again asserting that it had no legal authority to make a divided distribution of a member's HPRS disability retirement allowance.
On March 13, 1991, Patricia filed an application for writ of mandate in the District Court to compel the Division to make distributions of Martin's disability retirement benefits in accordance with the dissolution decree. On April 9, 1991, the court held a show cause hearing in which the parties argued the propriety of the writ. That same day, the District Court issued its Judgment and Peremptory Writ of Mandate ordering Lawrence Nachtsheim and the Department of Administration, Public Employees' Retirement Division, to immediately execute a draft upon the account of the HPRS pension fund for all amounts due Patricia since August 14, 1990 under the terms of the original dissolution decree and to issue subsequent drafts payable to her as the benefits periodically come due thereafter. The court also awarded the respondent $1,500 in attorney's fees and $220 in costs.
On April 16, 1991, the Division paid to Patricia one-half of all benefits that accrued to Martin from August 14, 1990 to that date in compliance with the writ of mandate. In addition, the Division has continued to pay one-half of the accrued benefits to Patricia as they come due. This appeal was filed on June 14, 1991.
Do the appellants have a clear legal duty to pay HPRS benefits directly to the respondent?
The granting of a writ of mandate is a discretionary act which will be upheld absent a showing that the district court abused its discretion. Hovey v. Dep't of Revenue (1983), 203 Mont. 27, 34, 659 P.2d 280, 284. The writ will lie where the party seeking to invoke it is entitled to the performance of a clear legal duty by the party against whom the writ is directed and there is no speedy and adequate remedy in the ordinary course of law. Section 27-26-102, MCA; State ex rel. Galloway v. City of Great Falls (1984), 211 Mont. 354, 358, 684 P.2d 495, 497. However, unless the performance is one which the law specifically enjoins upon a party as a duty of the office, trust or station, the writ does not lie. State ex rel. Swart v. Molitor (1981), 190 Mont. 515, 523, 621 P.2d 1100, 1105. Nor does the writ lie to compel the performance of an act which would be beyond the power of the party to which it is directed. State ex rel. Judith Basin County v. Poland, et al. (1921), 61 Mont. 600, 203 P. 352.
The appellants contend that they owe no clear legal duty to pay HPRS benefits directly to the respondent because of numerous statutory restrictions on the use of HPRS funds and the payment of benefits. They argue that, in light of the statutory restrictions, the direct payment of HPRS benefits to the respondent would be beyond their statutory power. The respondent, in turn, asserts that the HPRS statutes do not preclude the payment of benefits directly to her and that the appellants' clear legal duty to make such payments arises from the directive contained in the dissolution decree.
The HPRS statutes are contained in Title 19, Chapter 6, MCA. Before discussing *204 those statutes which are relevant to the issue at hand, we note that our function in construing and applying statutes is to effectuate the intention of the legislature. State ex rel. Roberts v. Public Service Comm'n (1990), 242 Mont. 242, 246, 790 P.2d 489, 492. If the legislature's intent can be determined from the plain meaning of the words used in a statute, we will go no further. Phelps v. Hillhaven Corp. (1988), 231 Mont. 245, 251, 752 P.2d 737, 741. In addition, it is the function of the courts to ascertain and declare what in terms or substance is contained in a statute; it is not our function to insert what has been omitted. State v. Crane (1989), 240 Mont. 235, 238, 784 P.2d 901, 903.
We conclude that no clear legal duty requires the appellants to pay one-half of Martin's disability retirement benefits directly to Patricia. Notwithstanding the dissolution decree, direct payment of benefits to anyone other than a statutorily recognized recipient is prohibited under the HPRS statutes.
The plain language of § 19-6-406, MCA, provides that HPRS assets cannot be used for any purpose other than the exclusive benefit of HPRS members and their beneficiaries and paying reasonable administrative expenses associated with the retirement system. A member is defined as a person who has accumulated salary deductions standing to his or her credit in the HPRS pension trust fund. Section 19-6-101(9), MCA. A beneficiary is defined as a surviving spouse or a dependent child, or if there is no surviving spouse or dependent child, a person nominated to receive benefits under § 19-6-602, MCA. Section 19-6-101(4), MCA.
The respondent is not a member of the retirement system as defined in § 19-6-101(9), MCA. As a result of the dissolution decree, the respondent is not, and never can be, a surviving spouse beneficiary of HPRS member Martin Neuhausen as defined in § 19-6-101(15), MCA. Under these facts, the diversion of the HPRS assets to the respondent in the manner directed by the District Court is prohibited; the diversion would constitute a use of those assets other than for the purposes authorized by § 19-6-406, MCA.
In addition to the restrictions on the use of the HPRS assets discussed above, § 19-6-702, MCA, provides that HPRS benefit payments may not be modified in any way without legislative action.
19-6-702. Payments to be monthly and fixed. The retirement allowances granted under the provisions of this chapter shall be paid in equal monthly installments and may not be increased, decreased, revoked, or repealed unless by act of the legislature of the state of Montana.
The legislature's intent to exercise exclusive control over the operation of the HPRS could not be stated more clearly. Thus, pursuant to this section, divided benefit payments payable directly to a former spouse of a HPRS member can be established only by an act of the legislature and not as part of a judicial decree.
Finally, § 19-6-705, MCA, exempts HPRS benefits from legal process.
19-6-705. Exemption from taxes and legal process. Any money received or to be paid as a member's annuity, state annuity, or return of deductions or the right of any of these is:
. . . . .
(2) exempt from levy, sale, garnishment, attachment, or any other process ...

. . . . .
(Emphasis added.) By enacting this section, the legislature has insulated the retirement system assets from actions taken directly against a member's benefits. The court's action in ordering the direct payment of HPRS benefits to the respondent, in both the dissolution decree and writ of mandate, constitutes prohibited legal process against money to be paid by the retirement system.
The respondent cites several Montana dissolution cases as support for her argument that the appellants should pay her portion of Martin Neuhausen's HPRS benefits directly to her. Her reliance on those cases is misplaced. The cases hold only *205 that retirement benefits are a marital asset which must be considered by the court when equitably distributing the marital estate; they do not hold that the public retirement systems in charge of administering the various retirement funds are obligated to make divided and separate distributions of benefits or any other distributions that are beyond the statutory parameters of those systems. See In re the Marriage of Keedy (Mont. 1991), 813 P.2d 442, 48 St.Rep. 572; In re the Marriage of Butler (1990), 243 Mont. 521, 795 P.2d 467; In re the Marriage of Sirucek (1985), 219 Mont. 334, 712 P.2d 769; In re the Marriage of Rolfe (1985), 216 Mont. 39, 699 P.2d 79; Sowell v. Teachers' Retirement System (1984), 214 Mont. 200, 693 P.2d 1222.
In sum, the Department of Administration is not charged with and, indeed, is prohibited by statute from making direct, divided payments of HPRS benefits to former spouses of HPRS members. The Public Employees' Retirement Board of the Department of Administration, as trustee of the HPRS funds, has a fiduciary duty to manage those funds strictly in accordance with the law. The HPRS statutes do not authorize payment of HPRS benefits to anyone other than a HPRS member or beneficiary and the Department cannot be compelled by a court to perform an act outside its statutory authority, which would be the effect of affirming the District Court. Having determined that the appellants owe no clear legal duty to pay HPRS benefits directly to the respondent, we need not address whether any speedy or adequate remedy exists in the ordinary course of law. We hold that the District Court abused its discretion by issuing the writ of mandate.
We note that direct benefit payments to former spouses pursuant to a dissolution decree could be created legislatively in Montana and, indeed, have been created in other states and under federal law. See, e.g., Tex. Gov't Code Ann., Public Retirement Systems, § 801 et seq. (Vernon 1992); § 8345(j)(1) of the Civil Service Code, Chapter 83, 5 U.S.C. §§ 8331-8348 (1986). To date, however, the legislature of this state has not provided for direct benefit payments to former spouses within the HPRS statutory framework and we will not judicially amend the statutes to provide for such payments.
The District Court, pursuant to § 27-26-402, MCA, awarded the respondent $1,500 in attorney's fees and $220 in costs incurred in securing the writ of mandate. It is unfortunate that the respondent incurred the above expenses based on the terms of the dissolution decree, but given our holding that the writ is not a proper remedy in this case, we must vacate the award of attorney's fees and costs. For the same reason, the respondent's request for additional damages pursuant to § 27-26-402, MCA, for attorney's fees and costs incurred on appeal must be denied.
As a final matter, the appellants request that the respondent be directed to return to the Division all HPRS benefits which have been paid to her in conformity with the writ of mandate issued by the District Court. The appellants cite no authority for the return of the benefits paid and do not specifically state how or to what extent the Division would be harmed if the benefits were not returned; nor do they suggest why the respondent, rather than Martin Neuhausen, is the appropriate person to repay the benefits under these circumstances where the respondent did not receive more of the marital estate than that to which she was entitled.
It does appears, however, although the record is not clear, that subsequent to the original dissolution decree and up until the time the Division complied with the writ of mandate, the Division paid to Martin Neuhausen his full and undivided disability retirement allowance. As a result of the writ being issued, it then paid to the respondent one-half of the benefits which accumulated from the time of the original dissolution decree (without any recourse against Martin Neuhausen to cover the respondent's share) as well as one-half of such benefits as subsequently have become due. Thus, the Division appears to have expended a greater amount of money because of the issuance of the writ than it would have otherwise. We conclude that it is necessary to remand to the District Court for a determination of whether the *206 Division, in fact, has overpaid benefits and, if so, for a determination of such relief as may be appropriate under the circumstances.
Reversed and remanded for entry of judgment denying the writ of mandate, for determination of whether the Division is entitled to a return of benefits paid to the respondent, and for such further proceedings consistent with this opinion in Cause No. DR-88-533(A) as may be appropriate.
TURNAGE, C.J., and HARRISON, HUNT, WEBER and McDONOUGH, concur.
TRIEWEILER, Justice, dissenting:
I dissent from the majority opinion.
The Department of Administration had a clear legal duty to pay retirement benefits to Patricia Neuhausen, and the statutes relied upon by the majority in no way prohibited it from doing so.
The Department's duty arose from the Amended Final Decree of Dissolution entered by the Flathead County District Court on November 28, 1990. That decree dissolved the marriage of Patricia Neuhausen and Martin Neuhausen, divided the Montana Highway Patrol Retirement benefits equally between the parties, and ordered the administrators of the retirement funds to issue separate checks to Patricia and Martin for their respective interests in those benefits.
The District Court clearly had jurisdiction to enter such an order. We have repeatedly recognized that pension funds are included in the marital estate. (See Sowell v. Teachers Retirement System (1984), 214 Mont. 200, 693 P.2d 1222; Marriage of Butler (1990), 243 Mont. 521, 795 P.2d 467.) By statute, the district court has the power and duty to:
[F]inally equitably apportion between the parties the property and assets belonging to either or both, however and whenever acquired and whether the title thereto is in the name of the husband or wife or both.
Section 40-4-202(1), MCA.
The District Court's decree discharging its statutory duty to divide the marital estate created a legal duty on the part of Nachtsheim to pay those benefits according to the District Court's decree. Neither of the statutes relied upon by the majority alter that legal obligation.
Section 19-6-406, MCA, simply prohibits use of retirement benefits or diversion to any purpose other than for the benefit of the member. In this case, the member was Martin Neuhausen and the administrator was ordered to pay the benefits for his benefit in discharging his obligation to divide his marital estate. It is interesting that at no time in these proceedings has Martin appeared or objected to the method by which the administrator was ordered to perform the administrative task that he would otherwise have to perform. Martin had an obligation to share his benefits with his former wife, and the administrator was ordered to assist him with the satisfaction of that obligation by issuing separate checks. Doing so was in no way adverse to Martin's interests. Therefore, the District Court's order was not precluded by § 19-6-406, MCA.
Likewise, the District Court's order in no way violated § 19-6-702, MCA. The District Court's order did not result in "increased, decreased, revoked or repealed" benefits to which Martin was entitled. It simply directed where they were to be paid. When it did so, they were assets of the marital estate over which the District Court had jurisdiction and which the District Court was authorized to divide pursuant to the previously stated authorities.
The majority opinion exalts form over substance. This Court has repeatedly held that pensions are to be included in marital estates and can be divided equitably. Yet, the majority now reverses the District Court's effort to do so in this case in a more administratively convenient manner by concluding that if the administrator writes two checks instead of one, the benefits have been modified.
The benefits are modified, if at all, when the District Court divides them. The fact that the same total amount is distributed by the administrator in two checks instead *207 of one does not in any substantive way modify the benefits.
The District Court's peremptory writ was a reasonable effort to accomplish a property division, which has been repeatedly authorized by this Court, with the least amount of unnecessary interaction between the parties following the dissolution of their marriage. This Court's reversal of that decision, based upon its rigid application of statutes which were never intended for the purpose to which they have been applied, simply reinforces the bureaucratic mind set that should have been discouraged by an additional award of attorney fees and costs on appeal.
I will not address the other issues raised on appeal because they were not the basis for the majority's opinion. However, considering those issues, in addition to the one on which the opinion is based, I would completely affirm the judgment of the District Court.
