This appeal is from a modification of a change of custody decree rendered after a hearing on a complaint in equity to set the decree aside.
Appellant husband and appellee wife were divorced in 1973. Appellee was awarded custody of the couple’s three minor children and $700 per month, $400 as alimony and $300 for child support. In 1974, appellant regained custody of one child, but the payments were not changed. In 1976, appellant petitioned the court for custody of his daughter, the last child living with the appellee as the third child was nearing eighteen. The trial court awarded the custody of the daughter to the appellant, but ordered the parties’ former agreement as to the payments to the wife to remain intact. Consequently, despite the fact that appellee had custody of none of the children, she was still receiving $300 per month marked as "child support.”
Approximately two years later, appellant brought this suit in equity seeking to set aside the order granting him custody while at the same time continuing the $300 per month child support. Instead, the trial court modified the order so that the entire $700 was denominated as "alimony.” Appellant appeals and we affirm.
1. There is no merit in the contention that the trial court modified the agreement sua sponte since appellant in his petition and appellee in her counterclaim asked for such other and further relief as the court deems just and proper. Upon a complaint in equity under Code Ann. § 81A-160 (e) the court has authority to grant such relief, legal or equitable, as may be necessary to afford complete relief. Under the circumstances of this case the trial court, having the parties before him, both having asked for complete equitable relief, could have set aside, modified or amended this order to do justice. Code Ann. § 81A-160 (f). We find no error in this court changing the order to specify that the whole amount to be paid is alimony, there being evidence that this was the agreement of the parties.
2. At the hearing on the motion for new trial, the trial judge agreed to hear limited oral testimony, and the *156appellant took the stand for direct and cross examination. However, when counsel for the appellant requested the opportunity to ask appellee two questions about her income tax returns, the trial judge ruled that he could not because the questions were "immaterial.” According to Code Ann. § 81A-143 (b), in a hearing on a motion for new trial, the judge may direct that the matter be heard on affidavits or partly on oral testimony or on depositions. The substance of this enumeration of error lies within the discretion of the trial judge, who did not abuse that discretion in this case.
Argued July 10, 1979 Decided September 6, 1979. Paul R. Koehler, for appellant. William D. Smith, for appellee.3. Appellant argues that his agreement to continue paying appellee $700 per month is void as against public policy because he felt coerced to agree in order to be given custody of his daughter. The transcript of the hearing on the motion for new trial reflects that it was appellant’s own attorney who convinced him to enter into this agreement. He admits he understood what he was agreeing to. His attorney at that time prepared the order the judge eventually signed. He never appealed that judgment until he moved, two years later, to have it set aside. Appellant cites us no authority which would indicate anything illegal or immoral about continuing the same level of payments a wife had once received as alimony and child support in exchange for custody of the child. The $700 constitutes alimony, and upon being petitioned to change the order, the trial judge did just that. There is certainly no error in enforcing a valid agreement of the parties.
Judgment affirmed.
All the Justices concur.