
335 N.W.2d 349 (1983)
E. James HOOD, Plaintiff and Appellee,
v.
Judith G. HOOD, Defendant and Appellant.
No. 13921.
Supreme Court of South Dakota.
Considered on Briefs March 30, 1983.
Decided June 22, 1983.
*350 John J. Delaney, Lead, for plaintiff and appellee.
Robert Moore, Rapid City, for defendant and appellant.
ANDERSON, Circuit Judge.
This is an appeal from an order entered subsequent to a decree of divorce entered by default. We affirm.
In the 1975 decree of divorce the trial court ordered child support, alimony and division of marital property pursuant to a stipulation of the parties and an addendum to that stipulation. Appellee, E. James Hood, was responsible for medical insurance coverage on the children and also medical expenses not covered by insurance. For a period of time appellee fulfilled this obligation by paying a monthly premium of $40 on a health insurance policy for the two children. Later, appellant, Judith G. Hood, secured health insurance on the children through her employer at a monthly premium rate of seventy-five dollars. Child support was $150.00 per child per month. Alimony was $100.00 per month. Each succeeding year the amount of alimony and child support was to automatically increase pro rata in an amount equal to ten percent of appellee's net income exceeding $12,500.00. Upon appellant's remarriage, her right to alimony ceased and any increase in appellee's child support obligation was calculated at 7.5 percent rather than ten percent.
In 1982, appellee moved the circuit court to determine the amount of child support arrearages, if any, and to abate all or part of those arrearages. Appellee also asked the circuit court to abate his responsibility for prior medical expenses of the children. Appellant requested that her former husband be held in contempt for failure to pay child support and medical expenses as ordered in the divorce judgment. She also requested attorney fees and an increase in child support.
The trial court ordered that the parties were responsible for their own attorney fees, that appellee was responsible for the medical expenses incurred by appellant on behalf of the children, and that the parties make arrangements for payment of the same. The trial court also abated all child support arrearages, struck the provision providing for an automatic percentage increase in child support, and increased appellee's future child support obligations to $175.00 per child per month.


*351 ATTORNEY FEES
The trial court has the authority to award reasonable attorney fees and this Court will disturb the trial court's decision only if there has been an abuse of discretion. Wallahan v. Wallahan, 284 N.W.2d 21 (S.D.1979). We find that the trial court did not abuse its discretion in ruling that each party should be responsible for their own attorney fees.

MEDICAL EXPENSES
We find no abuse of discretion in the trial court's ruling that appellee continue to be responsible for the medical expenses of the children. Part of appellee's responsibility for the medical expenses of the children was to provide medical insurance coverage. The trial court's ruling that appellee was responsible for the medical expenses of the children changed nothing; therefore, implicit in that ruling is the requirement that he continue to reimburse appellant for the amount of the insurance premium he was paying prior to the change of insurance companies. If appellant elects to secure insurance coverage other than that provided by appellee, she may do so but she may not increase his obligation to pay the premium.

CHILD SUPPORT
The trial court has continuing jurisdiction to modify child support obligations. State ex rel. Larsgaard v. Larsgaard, 298 N.W.2d 381 (S.D.1980). This power applies even though the child support obligation was created by agreement of the parties and later adopted by the Court. Johnson v. Lowary, 132 N.W.2d 823 (S.D.1965). Child support obligations may also be modified retroactively. Larsgaard, supra.
The trial court found that the percentage increase in payments agreed to by the parties was actually alimony and therefore terminated upon appellant's remarriage. This interpretation of a somewhat ambiguous agreement of the parties is not clearly incorrect and will therefore not be disturbed by this Court.
The most important factor which should be employed by trial courts in setting a child support obligation is the needs of the children. By this we mean the actual cost of providing food, clothing, shelter and the necessities of life. The needs of the children must then be apportioned between the parties based upon each parent's ability to pay. When the amount of child support owing is determined simply by multiplying a party's earnings by a percentage then "the myriad of possible changes aside from a party's increased earnings that are relevant to the issue of quantum of child support" are ignored. Karim v. Karim, 290 N.W.2d 479 (S.D.1980). In short, it is inappropriate to provide automatic increases in child support based upon a percentage of the obligated parent's income.
The order of the trial court is affirmed.
FOSHEIM, C.J., and DUNN and MORGAN, JJ., concur.
WOLLMAN, J., dissents.
ANDERSON, Circuit Judge, sitting for HENDERSON, J., disqualified.
WOLLMAN, Justice (dissenting).
The stipulation that the parties entered into (and it should be noted here that appellee was and is a practicing attorney) provided in part as follows:
B. Plaintiff shall be required to pay unto Defendant, as and for child support, the sum of One Hundred Fifty Dollars ($150.00) per month for each child and as and for permanent alimony the sum of One Hundred Dollars ($100.00) per month, for an initial total of Four Hundred Dollars ($400.00) per month total support and alimony. The child support for each child shall automatically, and without the necessity of further court order, be reduced by the sum of supported [sic] allocated towards that child as said child reaches the age of majority or otherwise becomes self supporting or emancipated. The sum allocable towards alimony shall automatically, and without *352 the necessity of further court order, terminate upon either the death or valid remarriage of the Defendant, whichever occurs sooner.
This agreement was specifically amended prior to the entry of the decree of divorce to modify the foregoing provision by adding the following language:
"The amount of child support and alimony required to be paid by Plaintiff to Defendant shall automatically, without further Court Order, be increased pursuant to the following formula, viz., said amount shall be increased in an amount equal to 10% of the net income earned by Plaintiff during the calendar year 1975, and subsequent years, to the extent it exceeds the amount of $12,500.00. For example, should Plaintiff's net income for the calendar year 1975 be in the amount of $15,000.00, said sum being $2,500.00 greater than $12,500.00, then, and in that event, 10% of said amount or $25.00 [sic] shall be added to the child support and alimony elsewhere provided for herein, the same to be allocated on a pro rata basis. Said increase shall become effective on or before May 1, 1976, and on or before May 1, of each year thereafter, and Plaintiff shall be required to provide to Defendant a photocopy of his federal income tax return for the calendar year immediately preceding each May, said copy to be provided to Defendant on or before May 1st of each year."
On September 5, 1975, the trial court entered a judgment and decree of divorce which, among other things, provided that:
IT IS FURTHER ORDERED, ADJUDGED AND DECREED That Plaintiff, E. James Hood, shall pay unto Defendant, Judith G. Hood, as and for child support and alimony, the sums set forth with particularity in the Stipulation and Addendum to Stipulation heretofore entered into by and between the parties hereto, which the Court hereby approves, said terms and provisions hereby being incorporated herein by reference.
Apparently appellee had no difficulty in understanding the above-quoted provisions, for it was not until March of 1982 that he filed a motion asking that the trial court define "net income" as used in the child support provisions of the stipulation and addendum thereto. Nowhere in the motion did appellee attack the validity of the percentage formula for determining child support. Notwithstanding appellee's acquiescence in this percentage formula, the trial court ruled as follows:
In reviewing the Stipulation and the addendum to the Stipulation, it appears to the Court that the child support is designated at $300.00 per month. It would appear and the record reflects that it is the intention of both of the parties that the $300.00 is the child support for the minor children. The addendum to the Stipulation clearly states that the amount of child support and alimony shall automatically be increased according to the formula so indicated. The addendum to the Stipulation cannot be construed as child support, since such an absolute criterion or rule such as this formula cannot be the basis for child support. Such a formula based on the single criterion of the defendant's earnings ignores the myriad of possible changes aside from a party's increased earnings that are relevant to the issue of quantum of child support. See Karim vs. Karim 290 NW2d 479 (SD1980). If the formula is to be construed as alimony which terminates on death or remarriage, then and in that event the alimony terminated on the remarriage of the Defendant in this matter.
The Court finds that the provision in the addendum to the Stipulation is alimony and that provision terminated on the remarriage of the defendant in this matter in December, 1979.
The trial court's analysis was fatally flawed by its original assumption that the Karim case automatically voids any percentage formula for increases in child support notwithstanding the fact that such a formula has been agreed to and acquiesced in by the parties themselves. In enforcing *353 an agreement much more stringent in its terms than the one at issue, we wrote:
The real claim is that the defendant signed an unconscionable agreement in the first instance, and the trial court should have relieved him of his bad bargain. This agreement is a harsh one, especially where he agrees to pay plaintiff 50% of any monthly income over $2,300, tax free. After paying taxes at this income level, he would have little if anything left for himself no matter how much additional gross income is received. However, the record indicates that defendant had the advice of an attorney, as well as tax experts, at the time the agreement was signed.... She [the plaintiff] drove a hard bargain, but the defendant accepted it and it was incorporated into the divorce decree.
Jameson v. Jameson, 90 S.D. 179, 183, 239 N.W.2d 5, 7 (1976).
Granted that a trial court has the authority to modify alimony and child support payments even though they were originally based upon a stipulation between the parties, such modification is proper only after the trial court in the exercise of its discretion determines that changed conditions warrant such a modification. Jameson v. Jameson, 306 N.W.2d 240 (S.D.1981), and cases cited therein. Had the trial court in the instant case exercised its discretion upon the basis that changed conditions warranted a modification of the stipulated child support agreement, we would then have before us a straightforward case of appellate review under the abuse-of-discretion standard. As it is, however, once the trial court made the mistake of interpreting our decision in Karim as automatically voiding any agreed-to formula provision, no exercise of discretion was presented for review.
Likewise, the trial court erred when it denied appellant's request for attorney fees for defending against appellee's motion. In view of the fact that appellee acquiesced for some six and one-half years in the provisions of the agreement that he himself helped to draw, and in view of the fact that appellant was required to return to South Dakota from Texas to enforce that agreement, she should have been entitled to attorney fees for the proceedings in the trial court. By the same token, I would award her $500.00 for attorney fees in connection with this appeal.
I would reverse and remand with directions that the trial court properly consider the provisions of the divorce decree in the light of our decision in Jameson v. Jameson, supra, and the cases cited therein.
