OPINION
HATHAWAY, Judge.This appeal is taken from the trial court’s denial of petitioner/appellant husband’s re*448quest for a modification of spousal maintenance. The parties were divorced in 1978 and the final decree of dissolution stated in paragraph two of the court’s order:
“The Petitioner, CHARLES EDWIN KELLER, is assigned and awarded as his sole and separate property the following: a. The gross retirement income from the United States Air Force; including cost of living increases;”
Paragraph five of the order read:
“Petitioner shall pay to Respondent as and for spousal maintenance or alimony the sum of FIVE HUNDRED THIRTY-SEVEN DOLLARS AND NO/lOO CENTS ($537.00) per month, commencing April 1,1978, until the death of either the Petitioner or Respondent; and the Petitioner shall execute Air Force Form No. 836 designated Retired Pay Allotment Authorization to Respondent. Petitioner shall pay as additional spousal maintenance one-half (V2) of any cost of living increases which he receives by virtue of his retirement from the UNITED STATES AIR FORCE until either the death of the Petitioner or Respondent. Further, that the remarriage of the Petitioner or Respondent shall not affect Petitioner’s obligation to pay spousal maintenance.”
In June 1982, appellant filed a petition seeking a termination or reduction in spousal maintenance. After a hearing, the court found changed circumstances and in July ordered that spousal maintenance be reduced to $700 per month. Appellee filed a motion for new hearing or, in the alternative, a motion for reconsideration. A hearing was held on this motion in November 1982. Subsequently, the court vacated the July order, denied appellant’s request for reduction of spousal maintenance and found that the spousal maintenance was actually an award to appellee of a portion of the military retirement benefits as her community property.
Appellant raises several issues in this appeal. He argues that the lower court erred in finding that the disputed award was a division of property where the clear and unambiguous terms of the divorce decree establish that paragraph five is an award of modifiable spousal maintenance. We disagree.
The parties to a divorce may, by agreement between themselves, settle and adjust all property rights growing out of the marital relation and, in the absence of fraud or undue influence, such an agreement is binding upon the parties. The court is not bound by any such agreement and can, if it believes the agreement to be unfair or inequitable, reject or modify the agreement. Wick v. Wick, 107 Ariz. 382, 489 P.2d 19 (1971); In re Estate of Harber, 104 Ariz. 79, 449 P.2d 7 (1969); In re Estate of Henry, 6 Ariz.App. 183, 430 P.2d 937 (1967). In the original divorce proceedings, both parties were represented by counsel (neither of whom are involved in this appeal) and the court accepted the agreement which had been drafted by appellee’s former counsel. That agreement and the decree are res judicata and cannot be modified.
The order granting the motion for new hearing was based upon the finding that the alimony was given in consideration for the property settlement and was therefore not subject to modification. Gillespie v. Gillespie, 74 Ariz. 1, 242 P.2d 837 (1952). In making such determinatipn, the trial court may consider all relevant factors leading up to the decree. Simpson v. Superior Court, 87 Ariz. 350, 351 P.2d 179 (1960), followed in States v. States, 124 Ariz. 189, 603 P.2d 81 (1979).
The decision of the trial court is supported by the terms of the divorce decree in paragraph 5 where the appellee is given one-half of the retirement pay, including cost of living increases, and the payments are to continue until death and are not to be affected by the remarriage of either. Additionally, the testimony of both parties support the court’s conclusion that the payments were given in exchange for appellee’s releasing her community claims in the retirement fund. We do not find the language of the agreement so clear and *449inclusive of the parties’ understanding as to foreclose the court’s inquiry.
We do not find appellee estopped from asserting that the alimony was given in consideration for the property settlement. Appellee has consistently maintained that the payments were alimony, albeit in the second hearing it was contended that the alimony couldn’t be altered because it was given in consideration of the property settlement. Cf., Simpson v. Superior Court, supra; see also Sailes v. Jones, 17 Ariz.App. 593, 499 P.2d 721 (1972); 31 C.J.S., Estop-pel, § 117, p. 625-626, n. 61.15.
With reference to appellant’s argument that the order granting appellee’s motion for new hearing is not sufficiently definite, Rule 59(m), Rules of Civil Procedure, is satisfied where “both the parties and the appellate court receive adequate notice of the grounds on which the trial court relied.” Reeves v. Markle, 119 Ariz. 159, 164, 579 P.2d 1382, 1387 (1978). The record clearly discloses the court’s reason for granting the motion for new hearing was in application of the test set forth in Simpson v. Superior Court, supra. The court stated:
“Pm saying that I am adopting the five points that are set forth in Simpson and Gillespie which bear on the circumstances and events leading up to entering into the agreement, and the fact that paragraph was put there in consideration of Mrs.Keller’s interest in the husband’s retirement pay.” (Emphasis added)
The grounds for the court’s decision were adequately established. Rules of Civil Procedure, Rules 59(a)(8) and 59(m), 16 A.R.S.
Affirmed.
HOWARD, C.J., and BIRDSALL, J., concur.