
943 N.E.2d 1169 (2011)
In re the MARRIAGE OF Christina L. SMITHSON, n/k/a Christina Campbell, Petitioner-Appellee, and
James T. Smithson, Respondent-Appellant.
No. 4-10-0677.
Appellate Court of Illinois, Fourth District.
January 31, 2011.
*1170 Kelli E. Gordon (argued), Feldman, Wasser, Draper & Cox, Springfield, for James T. Smithson.
Richard W. Hopp (argued), Decatur, for Christina L. Smithson.

OPINION
Presiding Justice KNECHT delivered the judgment of the court, with opinion.
The trial court terminated the joint-custody agreement of the parties and awarded *1171 sole custody of their minor children, Jacob Smithson and Ryan Smithson, to the mother, petitioner, Christina Smithson, n/k/a Christina Campbell. The trial court also found respondent, the father, James Smithson, to be in indirect civil contempt for failure to pay his half of noncovered health-care expenses for the children. James appeals both the custody decision and the finding of indirect civil contempt. We affirm in part and vacate in part.

I. BACKGROUND
James and Christina were married on March 7, 2000. Two children were born during the marriage, Jacob, on July 17, 2000, and Ryan, on May 30, 2003. James was in the United States Marine Corps and served two tours of duty in Iraq and Kuwait during the marriage. On November 15, 2004, Christina filed a petition for dissolution of marriage. On November 23, 2004, the parties filed a waiver of the time period for grounds. That same day, the parties entered into a joint parenting agreement which provided Christina would be the primary custodian of Jacob and Ryan. A judgment of dissolution of marriage was also entered on November 23, 2004, which included a property-settlement agreement providing James would be entitled to custody of the children on alternate Christmas vacations and 30 consecutive days during the summer.
The property agreement also required each party to maintain medical insurance for the children during their employment. The parties were then to each pay one-half of medical, dental, optical, orthodontal, or health-care-related expenses for the children not otherwise covered by insurance.
On January 25, 2008, James filed a motion to modify custody, requesting the joint-parenting agreement be terminated and he be awarded sole custody of Jacob and Ryan. On September 11, 2009, Christina filed a petition for adjudication of civil contempt, alleging James had failed to pay the one-half of medical, dental, optical, orthodontal, or health-care-related expenses for the children not otherwise covered by insurance as required by the judgment of dissolution.
On March 2 to 4, 2010, and April 30, 2010, the trial court held a hearing on the motion to modify custody and the petition for adjudication of contempt. After hearing testimony from numerous witnesses, the trial court entered an order on August 4, 2010. The court concluded joint custody was not working for James and Christina. The court also found James had not proved by clear and convincing evidence a change in physical custody from Christina to him was necessary for the well-being of Jacob and Ryan. Further, James failed to prove there was an agreement under which Christina would pay all health-care expenses not covered by James' insurance nor did he request modification of the judgment. He did not pay one-half of uncovered medical expenses nor did he request modification of the judgment. The court then denied the motion to modify custody, terminated the joint-parenting agreement, and awarded sole custody of Jacob and Ryan to Christina. The court also found James in contempt for failing to pay his share of the boys' medical bills. This appeal followed.

II. ANALYSIS

A. Custody
The determination of child custody rests largely within the discretion of the trial court, and its decision will not be disturbed on appeal unless it is against the manifest weight of the evidence or the trial court abused its discretion. In re Marriage of Craig, 326 Ill.App.3d 1127, 1129, *1172 261 Ill.Dec. 274, 762 N.E.2d 1201, 1203 (2002).
Section 610(b) of the Illinois Marriage and Dissolution of Marriage Act (Act) (750 ILCS 5/610(b) (West 2008)) provides:
"(b) The court shall not modify a prior custody judgment unless it finds by clear and convincing evidence, upon the basis of facts that have arisen since the prior judgment or that were unknown to the court at the time of entry of the prior judgment, that a change has occurred in the circumstances of the child or his custodian, or in the case of a joint custody arrangement that a change has occurred in the circumstances of the child or either or both parties having custody, and that the modification is necessary to serve the best interest of the child. * * * In the case of joint custody, if the parties agree to a termination of a joint custody arrangement, the court shall so terminate the joint custody and make any modification which is in the child's best interest. The court shall state in its decision specific findings of fact in support of its modification or termination of joint custody if either parent opposes the modification or termination."
To modify a custody order, a petitioner must demonstrate by clear and convincing evidence (1) a change of circumstances of the child or his custodian has occurred and (2) a modification is necessary to serve the best interests of the child. See In re Marriage of Burke, 185 Ill.App.3d 253, 256, 133 Ill.Dec. 408, 541 N.E.2d 245, 247 (1989). However, in the case of a joint-parenting agreement, where both parties agree to a termination of the agreement, a trial court may proceed directly to a determination of the child's best interests.
James argues the trial court applied the wrong burden of proof in denying his motion to modify custody. He contends he did not need to prove a change of circumstances had occurred as Christina agreed the joint-parenting agreement was not working and the court needed only to determine what custody arrangement was in the best interests of Jacob and Ryan. James notes with regard to joint custody, the supreme court has found stipulations by both parents they no longer wish to be joint custodians constitutes a change in circumstances and a custody modification should be made in accordance with the child's best interests. In re Marriage of Lasky, 176 Ill.2d 75, 81, 223 Ill.Dec. 27, 678 N.E.2d 1035, 1038 (1997). Following Lasky, this court found in In re Marriage of Ricketts, 329 Ill.App.3d 173, 263 Ill.Dec. 753, 768 N.E.2d 834 (2002), where both parents file petitions to modify a joint-custody agreement, each seeking sole custody, both parents are, in essence, agreeing joint custody should be terminated and there was no need to show serious endangerment to the child's physical, mental, moral, or emotional health in order to modify the custody agreement. Ricketts, 329 Ill.App.3d at 178, 263 Ill.Dec. 753, 768 N.E.2d at 838.
James contends although he alone filed a motion to modify custody by terminating the joint-custody agreement and awarding sole custody to him, testimony by Christina at the hearing on his motion amounted to an admission joint custody is not working and, therefore, should be considered to be a stipulation she no longer desires to have joint custody. He contends the trial court should have gone right to a best-interest analysis as the change in circumstances noted by both Lasky and Ricketts had occurred.
The circumstances of this case are different from those found in Lasky and Ricketts. Although Christina did testify as an adverse witness she found joint par-enting *1173 not working, during her attorney's opportunity to elicit testimony to clarify her testimony, Christina testified the reason she did not believe joint custody was working was she believed she was parenting with Julia, James' new wife, and not James. She based her belief on the fact the communication between the two families was conducted mostly by e-mail and James was at work when most of the e-mail exchanges were made. Julia operated an in-home day-care facility and was home during the day. Christina further stated she could continue to joint parent with James and this was in the best interests of the children.
Section 610(b) requires both parties agree to a termination of joint custody before the court can terminate a joint-custody order and make any modification of custody in the best interests of the children. However, these parties did not agree to terminate joint custody. Both parties did not file petitions to modify custody nor was there a stipulation to that effect. Christina's testimony, equivocal at best, was not an agreement to terminate joint custody. We will not extend the reasoning of either Lasky or Ricketts to include the facts of this case.
James argues even if Christina's testimony is not sufficient to eliminate a finding of change of circumstances or be considered the change of circumstances itself, he has proved by clear and convincing evidence there has been a substantial change in circumstances.
The trial court essentially made a finding of change of circumstances by finding joint custody was not working for James and Christina as "[b]oth have not communicated as necessary in the past" and, when they did communicate, James has dictated rather than discussed issues and has belittled Christina's parenting choices. Thus, James got part of the remedy he sought, the termination of the joint-parenting agreement, as the trial court found it was not working. The court went on to find James had not proved by clear and convincing evidence a change in physical custody from Christina to him was "necessary" for the "well-being" of Jacob and Ryan.
Both parties presented evidence of the other's flaws. Christina's marriage to James was her fourth and she was now married for the sixth time but in the process of a dissolution which also included a custody fight for the two-year-old half sister of Jacob and Ryan, Lillian Campbell. Christina had a 17-year-old son from her second marriage, Andrew Cook, who lived with her. Christina and her four children lived in a modest home in Argenta. Jacob and Ryan have lived there since Ryan was born and had always lived with their two half siblings, to whom they were very close.
Christina's fifth and sixth marriages, which occurred in the span of time from her divorce from James in November 2004 to 2010, were brief and included domestic violence to which Jacob and Ryan were exposed. Christina engaged in questionable practices regarding the sleeping arrangements for the boys in letting them sleep in her bedroom with her and each of her last two husbands. During her last marriage, to Jonathon Campbell, Jacob and Ryan had slept on the floor in Christina and Jonathon's bedroom while they were intimate. Christina admitted this was not in the best interests of the children. Christina took the boys with her to her parents' home over 20 times during the night when she and Campbell were fighting. This included school nights. Jacob expressed worry about his mother's safety.
*1174 Christina, Jacob, and Ryan were present when her older son, Andrew, built and set off an explosive device made from toilet cleaner and did not think he needed discipline for this act. Andrew also lit a pinata on fire inside the house to see if it was really flame resistant.
Jacob had problems with dental health, and Ryan had difficulties in school with reading and speech. Christina was not always on top of Jacob's dental-health issues and Ryan's speech issues, sometimes letting months go by without any treatment. She did not inform James of Ryan's speech and hearing difficulties until months after his diagnosis and he had been given an individual educational plan (IEP) by the local school district. Once James was informed of the boys' health or educational difficulties in 2007, he and his wife, Julia, were very involved in the decisions about their care. James complained of poor eating habits Christina was fostering in the boys as evidenced by their poor dental health and the fact they would not eat well-balanced and healthy food when visiting him in California.
As for James, once he returned from his second tour of duty in Iraq in 2004, he did not come home to Christina and his sons. He did not notify them where he was living and most of Christina's contact with him was through James's father. Despite the provisions of the judgment of dissolution allowing James visitation with Jacob and Ryan for 30 days in the summer and every other Christmas vacation, he did not exercise this visitation and appeared to have seen the boys once in 2005 and once in 2006. One of the visits was facilitated by James's father and not James himself. He made no requests of Christina for information about the boys' medical, dental, or other care.
James apparently moved to California, then Florida, and finally settled down in Murietta, California, and married Julia. Julia ran a day care in their home and did a lot of research on child care and child rearing. It was then, in 2007, when he started to insist on all of his visitation and to be involved in the decision-making for the boys' care. Julia, herself, had been married several times and had two children, Jillian, age 15, and Jett, age 13, living with James and Julia at the time of the hearing.
Dr. Helen Appleton was appointed by the trial court to do a custody evaluation. Dr. Appleton actually did two evaluations. The evaluations favor James, and Dr. Appleton ultimately recommended custody be given to James. Dr. Appleton interviewed both James and Christina as well as Julia, Jacob, Ryan, and Andrew. She reviewed extensive documents including many e-mails between the parties and dental and doctor reports of treatment of the boys as well as reports by school teachers. She did not interview any other relatives of the boys, school officials, or teachers.
Dr. Appleton found Christina had not demonstrated the ability to provide a stable home environment and has poor judgment in her selection of men. Although there was no physical abuse during her marriage to James, her history indicated she gravitated toward abusive men. Exposure to domestic abuse was not in the best interest of the children. While she noted witnessing abuse must have a detrimental effect on the boys, she could not pinpoint any specific effect she had observed. Dr. Appleton noted a close bond between Christina and Jacob and Ryan but, on her second interview of the boys, found they had been "coached" and the bond was not a healthy one as Jacob in particular was overly concerned about what his mother would think of the answers he gave to Dr. Appleton. Although she acknowledged there would be an adjustment *1175 period if the boys were separated from their mother, Dr. Appleton's opinion was it was in the best interest of the boys for James to have physical custody.
A guardian ad litem, James Zachry, was also appointed for Jacob and Ryan. Zachry interviewed the boys and their teachers and read the depositions of each parent. Although he described Christina's personal life as a "train wreck," Zachry recommended it was in the children's best interest to remain with Christina. Zachry found both boys were healthy, well-fed, and personable. They lived virtually their entire lives in Argenta and went to school there. Zachry believed the boys had been coached in their answers by Christina and her mother, who lived nearby. Despite the coaching, he found the boys' wishes to live with their mother to be sincere.
Zachry found the boys enjoyed their time spent with James and Julia, and Julia's children had a good relationship with the boys. He found James raised legitimate concerns regarding Christina's personal life and inadequacies in her care of the boys. Zachry found James and Julia both had the boys' best interests at heart.
Zachry found James had a distinct disadvantage by living in California since he could not see the boys very often. Christina had a distinct advantage because she always had physical custody of the boys. She has taken an active role in their schooling and been a parent active in their lives. She sincerely wishes the best for the boys and tried to be her best for them despite some problems.
Zachry acknowledged Dr. Appleton's report and findings and stated those recommendations could be supported by the facts. However, in Zachry's opinion, uprooting Jacob and Ryan from the only home they had ever known, the school system with which they were familiar, and the social community in which they have lived would not be in their best interest.
Zachry noted while Christina has not led a stable life, she has a support system. Her parents live near her as well as her brother and other relatives. James absented himself from the boys' life by choosing to live in California and, thus, was unable to be involved in their daily life since 2004. He has not been a model of stability. He has had several different jobs from the time he and Christina were married to the present, has been in the military, and has gone back to school. While Zachry thinks Christina's lifestyle choices must have had some effect on Jacob and Ryan, they appear to be happy, healthy, and well-adjusted.
Zachry recommended custody remain with Christina but James should have as much visitation as feasible given the distance between his home and Christina's home.
The trial court interviewed both Jacob and Ryan in camera. They both professed a desire to live with their mother.
Section 602(a) of the Act (750 ILCS 5/602(a) (West 2008)) provides a trial court shall consider all relevant factors when determining the best interests of a child, including the factors specifically set forth by the Act. These factors are:
"(1) the wishes of the child's parent or parents as to his custody;
(2) the wishes of the child as to his custodian;
(3) the interaction and interrelationship of the child with his parent or parents, his siblings and any other person who may significantly affect the child's best interest;
(4) the child's adjustment to his home, school and community;
(5) the mental and physical health of all individuals involved;

*1176 (6) the physical violence or threat of physical violence by the child's potential custodian, whether directed against the child or directed against another person;
(7) the occurrence of ongoing or repeated abuse * * * whether directed against the child or directed against another person;
(8) the willingness and ability of each parent to facilitate and encourage a close and continuing relationship between the other parent and the child; and
(9) whether one of the parents is a sex offender." 750 ILCS 5/602(a) (West 2008).
Both parents desire custody of Jacob and Ryan. The boys are young but both expressed a desire to live with their mother. The boys get along with both parents as well as James' wife, Julia, and her children and Christina's other children, the boys' half siblings, Andrew and Lillian. Although Dr. Appleton found the boys' relationship with Christina to be an insecure attachment and not healthy, all of the other evidence showed Christina has raised two happy, healthy, well-adjusted boys, with help from her family support system. James absented himself from their lives for several years and has not been involved in the day-to-day care of feeding, bathing, and school activities. James' most recent involvement has been to have visitation with the boys for summer and Christmas vacations when daily life with them is just that, a vacation.
Jacob and Ryan are adjusted to their school, home, and community in Argenta. They have lived nowhere else. The evidence was overwhelming they are happy, overall healthy, and well-adjusted. James has been concerned Ryan's speech and hearing needs were not being adequately addressed, but he has an IEP and is receiving services. By the end of the custody hearing, it was noted Ryan was going to be held back in first grade as he was immature and not quite meeting educational goals. Jacob was a high-achieving student in the fourth grade. His dental issues had been addressed. The issues needing to be addressed for both boys were not completely addressed until James became involved, but Christina has now addressed them.
No evidence showed either parent or Jacob or Ryan had mental- or physical-health issues which would prevent the parents from parenting or the children from thriving. Christina has a history of being in abusive relationships, some of which predate the birth of Jacob and Ryan. However, they were present for some incidents of physical domestic violence as well as heated arguments. This factor weighs against Christina. There is no ongoing abuse and neither parent is a sex offender.
As for each party's willingness to foster a relationship between Jacob and Ryan and the other parent, the evidence in this case showed a deteriorating relationship between the parents. Christina tried to coach the boys against James, and James went out of his way to discover as much negative information as he could on Christina to present in court. These facts do not bode well for either parent continuing to foster a good relationship between the boys and the noncustodial parent.
Although "train wreck" may describe Christina's past life in relation to the men in her life, the evidence indicated she has been a good mother to Jacob and Ryan overall and they were currently thriving in her care. No evidence showed she was currently in any relationship, let alone an abusive one. If James' interest in the boys' well-being remains at its current level, he will keep Christina focused should she be tempted to falter in her care of the boys.
*1177 The trial court concluded James did not prove it was necessary to change physical custody from Christina to him. The court also concluded the joint-custody arrangement should be terminated, and it was in Jacob and Ryan's best interests to be in Christina's custody. These conclusions and ensuing orders by the court are not against the manifest weight of the evidence or an abuse of discretion.

B. Contempt
James also appeals from the order of the trial court finding him in direct civil contempt for failure to pay his share of health-care expenses for Jacob and Ryan not covered by insurance.
Whether a party is guilty of contempt is a question of fact for the trial court, and its ruling will not be disturbed unless it is against the manifest weigh of the evidence or an abuse of discretion. In re Marriage of Spent, 342 Ill.App.3d 643, 653-54, 277 Ill.Dec. 476, 796 N.E.2d 191, 200 (2003). The existence of an order of the court and proof of willful disobedience of that order must be shown for a finding of indirect contempt. The burden in resisting a finding of contempt rests on the alleged contemnor to show noncompliance was not willful and he has a valid excuse for failure to follow the court order. Spent, 342 Ill.App.3d at 653, 277 Ill.Dec. 476, 796 N.E.2d at 200.
The property-settlement agreement executed by the parties and incorporated into the judgment of dissolution of their marriage stated as follows:
"[III.] 5. Each of the parties shall maintain medical insurance available to them through their employment for the benefit of the minor children of the parties, and each of the parties shall pay one-half of any medical, dental, optical, orthodontal or other health care related expense for the children not covered by any insurance."
James admits this agreement exists but contends the parties later agreed Christina would pay all uncovered medical expenses for Jacob and Ryan in exchange for not being obligated to provide medical insurance for them; while James would continue to provide primary medical-insurance coverage for the boys. Christina emphatically denied there was any such agreement.
James admits there was no written agreement between the parties modifying the court order. He introduced at trial several e-mails between himself and Christina which he claimed proved Christina had agreed to this modification. One e-mail from James asked Christina to confirm the agreement and she replied "Thank you." The other e-mail from James admitted there was no written modification agreement but he claimed Christina responded to this e-mail acquiescing to it. James did not have a copy of her response. Christina denied responding to this e-mail and denied entering into any agreement to modify the original court order.
The trial court found James did not prove an agreement to modify the original order as to payment of uncovered medical expenses. The court noted James never requested modification of the judgment by the court.
Although the evidence as to the agreement was in dispute, the trial court is in a superior position to judge the credibility of the witnesses. In re Marriage of Bates, 212 Ill.2d 489, 515, 289 Ill.Dec. 218, 819 N.E.2d 714, 728 (2004). We will not substitute our judgment for the trial court's finding of fact there was no modification of the court order. This decision of the court was not against the manifest weight of the evidence or an abuse of discretion.
*1178 James argues even if the court finds there to have been no agreement to modify his obligations to pay his share of uncovered medical expenses, he had a good-faith belief there was such an agreement and, therefore, his actions did not amount to willful disobedience of a court order. The evidence did not persuade the trial court there was an agreement, but it did explain why he did not pay. Thus, he contends he was not will-fully disobeying a court order and should not be held in contempt of court.
The trial court found Christina did not send documents or demand payment for one-half of uncovered medical expenses for several years, but James was aware of those expenses because he received explanations of benefits because he carried the health insurance. He had notice Christina was seeking payment for these expenses at least since she filed the petition for adjudication of indirect civil contempt on September 11, 2009. James did not pay any of those expenses and he had the ability to do so.
James has an arguable point, but we find because he did nothing to reduce the alleged modified agreement to writing or bring it before the court despite the equivocal "agreement" he received from Christina, it was unreasonable for him to rely on the alleged modifications and not pay his share of uncovered medical expenses prior to Christina filing a petition for an adjudication of indirect civil contempt. He was fully aware of the existence of the original agreement as to uncovered medical expenses. We do not believe his conduct supports a finding of civil contempt.
Instead, we conclude his conduct was not justified and he remains responsible for his share of uncovered medical expenses and the attorney fees Christina incurred seeking to enforce the original agreement.

III. CONCLUSION
We find the trial court's judgment terminating the joint-parenting agreement and placing full custody with Christina is not against the manifest weight of the evidence and not an abuse of discretion. We conclude the finding of indirect contempt is against the manifest weight of the evidence, and we vacate it.
We affirm the judgment in part and vacate in part (the finding of contempt).
Affirmed in part and vacated in part.
Justice TURNER concurred in the judgment and opinion.
Justice POPE specially concurred in part and dissented in part, with opinion.
Justice POPE, concurring in part and dissenting in part:
I concur with the majority opinion regarding the custody issue. However, I respectfully dissent from the majority's decision concerning the contempt issue. As noted by the majority, the trial court is required to make factual findings when determining whether a person is guilty of contempt. These factual findings are entitled to deference by the appellate court and should not be disturbed unless against the manifest weight of the evidence. Certainly, in determining whether the alleged contemnor's disobedience of a court order is willful, the trial court is called upon to make credibility determinations.
Here, the evidence is undisputed on the following issues. James was required to pay one-half of the uncovered medical expenses, he received explanation-of-benefits statements showing any unpaid balance, and he had the ability to pay and failed to pay his share. The only disputed *1179 issue was willfulness. James's contention Christina agreed to this arrangement is not supported by the record. The agreement of the parties provided for both parents to carry insurance through their employment. Christina later became unemployed and did not have an employer through whom she could carry insurance. This did not relieve James of his obligation to maintain insurance or to cover one-half of the unpaid medical bills.
James never sought modification of the agreement in court nor could he produce any written documentation showing Christina's agreement to any modification. He failed to pay any out-of-pocket expenses from 2005 on, despite demands for payment by Christina when she had a known address for him and a written demand by Christina's attorney in August 2009. Following the filing of the contempt petition, James sent an e-mail to Christina stating he would pay 50% of the uncovered medical expenses. According to counsel during oral argument before this court, these expenses still have not been paid.
The trial court found, after hearing extensive testimony, James failed to pay his obligations, he had the ability to pay, and he failed to prove any agreement between the parties that would mitigate his conduct. I believe the trial court's findings are not against the manifest weight of the evidence, and therefore I would have affirmed the trial court in toto.
