This is an appeal in a divorce action. The question presented for review concerns a magistrate’s ruling that the husband, Gene Vail, was liable to his former wife, Dora Vail, for one-half of the parties’ income tax obligation paid through withholding from the wife’s wages during the year preceding their decree of divorce. The magistrate’s determination was based upon a finding that the decree of divorce unambiguously required reimbursement to the wife of the amount in question. The magistrate’s decision was upheld on an intermediate appeal to the district court. We hold that the decree is ambiguous and we remand the case for further proceedings.
The marriage between the parties was dissolved on January 14, 1988. The judg*521ment and decree of divorce entered by the magistrate was endorsed by the parties to evidence the expression of an agreement reached between them prior to the divorce. The endorsed decree contained provisions detailing the division of the parties’ community property interests. The decree also set forth two recitals allocating the parties’ debts, including the tax obligation at issue on this appeal. Paragraph number 3 provided that the wife “shall assume, hold the [husband] harmless on account of and pay when due the following community debts: ... One-half of the total income tax obligation, both State and Federal, for the year 1987. Each party is liable for one-half correction to be made if overpayment is made by [the] other party.” Another paragraph, numbered 5, similarly addressed the husband’s duty. It recited that the husband “shall assume, hold the [wife] harmless on account of and pay when due the following community debts: One-half of the total income tax obligation, both State and Federal, for the year 1987 and all obligations for years prior thereto----”
At the time the decree was entered, the tax obligation of the parties had not been computed. Later, their federal and state tax returns were prepared, showing a total obligation of $13,922. Of this amount, $10,638 had been withheld from the wife’s wages which she received as a salaried employee of a local medical center, leaving a balance to be paid with their tax returns of $3284.1 Based upon the tax returns, the husband tendered to the wife $1642, representing one-half of the balance due for their taxes. The wife rejected the tender and instead demanded that he also pay to her $5319 for one-half of the funds that had been withheld from her salary during the 1987 tax year.
When the husband refused to comply, the wife instituted a proceeding to hold the husband in contempt of court for violating the divorce decree. After hearing evidence, the magistrate held the husband in contempt of court for wilfully refusing to discharge his obligations under the divorce decree. The magistrate rejected a claim by the husband that the decree was ambiguous. The magistrate sentenced the husband to five days in jail unless the sums demanded by the wife were paid by 2:00 that afternoon. The husband immediately appealed to the district court, and, upon posting of a bond by the husband, the order of the magistrate was stayed. Eventually, the district court upheld the magistrate’s decision that the husband was liable to the wife in the amounts she claimed. However, the district court set aside the order holding the husband in contempt of court and remanded the case for a determination whether the husband had the power to make the required payment. The husband then prosecuted this appeal from the district court.
Simply put, the issue in this case is whether the husband is liable only for one-half of the unpaid balance óf the taxes due for 1987, or is also liable to the wife for one-half of the sum withheld from her wages for payment of taxes. We think the dispute in this case can be resolved through application of basic legal principles.
We begin by recognizing that parties have rights given to them by law, but they are at liberty to contract with respect to those rights. I.C. § 32-916. Idaho’s community property laws provide that income earned during a marriage is community property (I.C. § 32-906); that community debts generally are to be paid with community property (Donndelinger v. Donndelinger, 107 Idaho 431, 690 P.2d 366 (Ct.App.1984)); and that community property is to be divided equally, unless the magistrate finds a cogent reason for making an unequal division. I.C. § 32-712; Donndelinger, supra.
If these legal principles were applied here, the result would favor the position taken by the husband in this case. The community debt (taxes) would be paid, as much as possible, with a community asset (the amounts withheld from the wife’s earnings). The remaining balance would *522be paid by the parties in such proportions as the court might direct, either from other community property or from separate property (such as the parties’ post-divorce earnings).
The question, however, is whether the parties agreed to an alternative arrangement. According to the wife, the parties agreed that each spouse would pay half of the total tax obligation without' the husband receiving any credit for his community share of the taxes withheld from her earnings during the marriage. This scheme would alter the operation of the community property laws by entitling the wife to reimbursement of half of the withheld community earnings applied to the tax obligation.
In order to determine whether such an arrangement existed, the divorce decree— which constitutes not only a judgment of the court but also the underlying agreement of the parties — must be examined. The parties negotiated the terms set forth in the decree and signed the instrument itself. The language of the decree can be read to support the wife’s contention, but it also reasonably supports the husband’s position. Consequently, the language of the decree is ambiguous. Laight v. Idaho First National Bank, 108 Idaho 211, 697 P.2d 1225 (Ct.App.1985); Rutter v. McLaughlin, 101 Idaho 292, 612 P.2d 135 (1980).2
Because of the ambiguity of the decree in this action, we remand the case to the district court with directions to remand it further to the magistrate division for a determination whether — as a matter of fact — the parties had a meeting of the minds. If the magistrate court is unable to determine whether the parties had a meeting of the minds, then the court should simply resolve the issue by applying the community property principles.
Costs to appellant, Gene Vail. No attorney fees awarded.
. The husband was self-employed during the year 1987. Consequently, there were no income taxes withheld from his income. Also, he paid no tax estimates for 1987.
. Whether a contract is ambiguous is a question of law upon which we exercise free review. Laight, supra; Clark v. St. Paul Property and Liability Ins. Cos., 102 Idaho 756, 639 P.2d 454 (1981).