
239 P.3d 774 (2010)
In the Matter of John Doe, a minor child.
John DOE I, Plaintiff-Respondent,
v.
Jane DOE, Defendant-Appellant.
No. 36572.
Supreme Court of Idaho, Boise, August 2010 Term.
September 7, 2010.
*775 Bauer & French, Boise, for appellant. Charles B. Bauer argued.
Paula B. Sinclair, Twin Falls, for respondent.
EISMANN, Chief Justice.
This is an appeal from an order modifying the custody provisions in a divorce decree on the ground that Mother was engaging in a pattern of dysfunctional behavior showing that she was completely irrational with regard to sharing custody of their child with Father and that Mother's behavior was negatively impacting the child's relationship with Father. We affirm the order of the magistrate court.

I. FACTS AND PROCEDURAL HISTORY
John Doe I (Father) and Jane Doe I (Mother) were married on August 30, 2003, but they separated about four months later. They have a son who was born in March of 2004. On November 5, 2004, Father filed for divorce, and the divorce decree was entered on September 9, 2005. The parties were granted joint legal and physical custody of their son, with Mother being granted primary physical custody. Father was to have "the right to actual physical custody of said child at such times and in such a way as to assure said child a frequent and continuing contact with both parties, in order that each of said parties might foster and preserve the parent-child relationship."
On June 27, 2007, Father filed a motion to modify the decree to grant him sole legal custody and primary physical custody of the parties' son on the ground that Mother had engaged in a pattern of denying him access to the child. The motion was tried during six days from August 27 to December 12, 2008.[1] After post-trial briefing by the parties, on February 13, 2009, the Magistrate entered findings of fact and an order granting Father's motion.
Based upon Mother's course of conduct since the divorce, the magistrate found: "It must be said that she is completely irrational on the subject of sharing this child with his father. She seems strangely unaware of the inconvenience and difficulty which her actions cause to others, and of the damage which these behaviors can do to her child." Noting that Mother continued attempting to deny Father access to their son while the motion to amend the decree was pending, even up to a week or two before the trial started, the magistrate wrote that he "is not persuaded that [Mother] understands her dysfunctional role in these problems; or has, at present, the maturity to change it." The magistrate concluded that the best chance for the parties' son to be raised by mature adults was for Father to have primary physical custody. Father had remarried in April 2006.
After denying Mother's motion for reconsideration, the court entered an order on April 16, 2009, modifying the divorce decree by granting Father sole legal custody and primary physical custody of the parties' son. The order also set forth the specific times that Mother would have physical custody. Mother requested permission to appeal directly *776 to this Court, and we granted that motion. She then timely filed a notice of appeal.

II. ISSUES ON APPEAL
1. Did the magistrate abuse his discretion in modifying the divorce decree?
2. Is Father entitled to an award of attorney fees on appeal?

III. ANALYSIS

A. Did the Magistrate Abuse His Discretion in Modifying the Divorce Decree?
"Once a custodial order is entered, the party seeking to modify it must first demonstrate that a material and substantial change of circumstances has occurred since the entry of the last custodial order." Brownson v. Allen, 134 Idaho 60, 62-63, 995 P.2d 830, 832-33 (2000). The trial court must base its decision regarding custody on the best interests of the child. King v. King, 137 Idaho 438, 444-45, 50 P.3d 453, 459-60 (2002); Idaho Code § 32-717(1). "[T]he determination of whether to modify child custody is left to the sound discretion of the trial court, and this Court will not attempt to substitute its judgment and discretion for that of the trial court except in cases where the record reflects a clear abuse of discretion." Levin v. Levin, 122 Idaho 583, 586, 836 P.2d 529, 532 (1992).
Mother lists four issues on appeal that, in essence, contend that the magistrate abused his discretion in modifying the custody provisions of the divorce decree. We will discuss each issue separately.
1. Mother contends that changing custody in this case because the parties were in conflict is punitive and inconsistent with Idaho law. Mother characterizes the decision changing custody as merely punishing her because the parties could not get along. In making that argument, she quotes from Kalousek v. Kalousek, 77 Idaho 433, 439, 293 P.2d 953, 957 (1956), wherein we stated: "Custody of children in divorce cases must always be determined upon the basis of the welfare of the children. It cannot be used as a means of punishment or reward of either parent." Mother contends, "The yardstick for determining custody is, and should be, the welfare and best interests of the child. Once [sic] looks in vain in this record for any substantial evidence [the child's] welfare is being directly and systematically harmed by either of these parents and their squabbling."
In Kalousek, the trial court changed custody of the parties' twelve-year-old daughter from the mother to the father because the mother, who lived in Utah, had failed to deliver the child to the father in Idaho for his three-month summer visitation. The trial court found that mother had done so for the purpose of alienating the child's affections for her father. During the hearing on the motion to change custody, the child testified that she did not want to live with her father. This Court held that mother's conduct in that case did not warrant transferring custody to the father because there was no showing that the child's welfare was adversely affected by mother's conduct. Id.
Years after Kalousek was decided, the legislature amended the statute regarding child custody. Former Idaho Code § 32-705 provided, "In an action for divorce the court may, before or after judgment, give such direction for the custody, care and education of the children of the marriage as may seem necessary or proper, and may at any time vacate or modify the same." Ch. 378, § 3, 1980 Idaho Sess. Laws 961, 962. In 1980, the legislature amended and renumbered the statute so that it provided as follows, "In an action for divorce the court may, before and after judgment, give such direction for the custody, care and education of the children of the marriage as may seem necessary or proper in the best interests of the children....." Id. Although the statute has since been amended, it still provides that the custody determination, including any modification, shall be "as may seem necessary or proper in the best interests of the children." Idaho Code § 32-717(1).
Thus, the issue is whether there is substantial and competent evidence to support the magistrate's conclusion that changing physical custody was in the child's best interests. In this case, there was evidence that *777 Mother's conduct was directly affecting the child's relationship with Father. It is unnecessary to recount all of such conduct, but describing some of it will put in context the impact it was having on the parties' son.
Shortly after their son was born, Father would call to arrange times with Mother when he could visit their son. When he would arrive for the scheduled visitation, Mother and their son would be gone. Father then tried dropping by unannounced for visitations, but that understandably annoyed Mother and her parents, with whom she was living.
Father filed for divorce, and the parties agreed to a child custody arrangement, with the assistance of a clinical social worker. The times that Father was to have physical custody were not specified, but were to be determined by agreement with Mother. Father started having physical custody on Saturdays, and then it expanded to Saturdays and Sundays, but not overnight. When their son reached age two and one-half, Father had visitation every other weekend, including overnight on Saturday. Mother would bring their son to Father's residence in Twin Falls on Friday evenings, and Father would return the child to Mother's residence near Burley on Sunday. Although Father was generally able to exercise his visitation rights, Mother engaged in various types of conduct, in their son's presence, that simply amounted to harassment.
Mother's conduct included falsely telling Father that he could not exercise visitation because their son was sick and, at another time, falsely telling Father that she had to take the child to the emergency room after picking him up from Father's house. Once, she told Father that the time for visitation had to be changed because she was getting married and moving across the state. Two days later, she told him that her fiancé had been killed in a car accident. The entire story was false, and at trial she lied about having made those statements, even though they had been recorded by Father. She also called the police, falsely claiming that Father had harassed her and yelled at her when he picked up their son for visitation. Because Father had begun recording some of his contacts with Mother, he was able to show the officer that Mother's allegations were false. When Mother would not allow Father to have their son at a family reunion that included members of Father's family who had come from other states and from Mexico, Father drove some family members past Mother's house so they could at least see the child, who was playing outside. Mother responded by attempting to obtain a domestic violence protection order against Father. Another time, Mother and Father agreed that Father could return their son from visitation at 7:00 p.m. At about 6:00 p.m., she called Father and told him she had changed her mind and demanded that the child be returned immediately. Father agreed to do so, and as he was driving to Mother's residence with the child Mother called the police to report that Father had not returned the child at the time stated in the custody order. After Father remarried, Mother refused several times to drop the child off at Father's home because he was not physically present and Mother refused to leave the child with his stepmother. One of the times, Father was in the bathroom, but Mother would not believe the stepmother when she said that was where Father was. At other times, Father was not yet home from work.
The above incidents are a sample of Mother's behavior. There were also numerous incidents of Father calling to talk with Mother, and her responding by hanging up the telephone or by simply putting it down and walking away. When Mother would have a telephone conversation with Father, she was very argumentative. Many of these incidents occurred in the presence of the parties' son. When Father would try to talk to Mother when she brought their son to Father's house, she would not respond but merely walk away. After driving a ways down the street, she would often telephone Father and begin arguing with him.
The parties stipulated to an order appointing as the court's custodial expert a clinical social worker who had been doing child custody evaluations for about twenty-five years. She submitted a written report and recommendations and was called by Mother as a witness. The custodial expert testified that *778 Mother was demanding, arbitrary, and capricious in front of the parties' son and that he had begun mimicking her. Mother was pulling the child into her drama, and her conduct was "seriously unhealthy" for the child regarding his relationship with Father. In Mother's presence, the child would refer to Father by his first name, rather than by "Daddy," and would not show affection to Father. Once Mother would leave, the child's conduct changed. He wanted Father and stepmother to hold him and became very comfortable. The expert stated that the current relationship was very detrimental to the child and if he remained in Mother's home, he would not grow up feeling like he could love both parents. In her written report, the expert concluded, "[Mother's] behaviors demonstrate she cannot handle the responsibilities of primary custodian as they relate to noninterference with the father's relationship with the child. This is having a detrimental effect on the child." The magistrate did not conclude that Father was faultless or that he handled the situations perfectly, but it found that "the problem clearly lies mostly with [Mother's] immaturity."
The magistrate did not change custody simply because the parties could not get along. There was substantial evidence that Mother's behavior was contrary to the child's best interests. Although the magistrate did not expressly state that the change in custody was in the child's best interests, such a finding is implicit in the magistrate's written decision. In setting forth the applicable law, the magistrate began by writing, "In decisions concerning the custody of children, the welfare and best interests of the child is of paramount importance." The magistrate found, "It must be said that [Mother] is completely irrational on the subject of sharing this child with his father. She seems strangely unaware of the inconvenience and difficulty which her actions cause to others, and of the damage which these behaviors can do to her child." The magistrate wrote that "children should be raised by mature adults" and concluded that the child's "best chance for such a parent-child relationship is at present in the home of his father." Finally, the magistrate found that "stability for this child will be promoted by primary residence with his father." The magistrate did not err in concluding that changing physical custody was in the child's best interests.
2. Mother contends that changing custody because of alleged violations of existing custody orders rather than enforcing the orders by means of contempt powers was inconsistent with joint custody. With respect to the change in physical custody, Mother argues that there were only a few times that she actually violated a court order regarding custody and that the magistrate should simply have exercised its contempt powers rather than changing custody. In support of that argument, Mother quotes from In re Marriage of Hansen, 48 Or.App. 193, 616 P.2d 567, 571 (1980), where the court said, "[W]e show little regard for our own decrees if, instead of enforcing them by means of our contempt powers, we throw up our hands and order a change in custodya change which punishes the children too much and the mother not enough."
Mother does not cite anything in the record indicating that the magistrate changed custody simply because she had violated custody orders several times. The magistrate did mention that shortly before trial Mother had violated a custody order, but not as a ground for changing custody. Rather, it was an example of Mother's conduct that was inconsistent with her contention that she had recently seen the light and would change her behavior. The magistrate wrote:
However, it must be said that she is completely irrational on the subject of sharing this child with his father. She seems strangely unaware of the inconvenience and difficultly which her actions cause to others, and of the damage which these behaviors can do to her child. A review of her conduct, which is only partly described above, makes this conclusion inescapable. [Mother] cannot really deny this, but wishes the court to believe that in recent months she has seen the light and that things have improved. There is some basis in the evidence for a hope that things have improved in the very recent past. However, as recently as the summer of 2008, when [Father] was supposed to get a *779 week with [the child] in July and another week in August, he was unable to get his week in July and he got time in August only after forcing the matter through his attorney. This was just a week or two before the trial started. The court is not persuaded that [Mother] understands her dysfunctional role in these problems; or has, at present, the maturity to change it.
Mother also contends that there is nothing in the record supporting the magistrate's findings that Mother "is completely irrational on the subject of sharing this child with his father" and that she "seems strangely unaware of the inconvenience and difficultly which her actions cause to others, and of the damage which these behaviors can do to her child." The findings are amply supported by three and one-half years of Mother's behavior and the testimony of the court's custodial expert.
Finally, there is no requirement that the magistrate first seek to change Mother's conduct through repeated contempt proceedings before changing custody. The magistrate's primary concern was the best interests of the child, and under the circumstances of this case he did not abuse his discretion in changing physical custody without first using his contempt powers.
3. Mother contends that the magistrate's reliance on the expert's recommendation was error. In her written report, the custodial expert recommended that Father be granted sole legal custody of the parties' son. At trial, she explained her reasons for that recommendation as follows:
Because there is no communicating with mother. There is no getting agreements. There is no follow through on agreements. There is just this acrimony and conflict. Somebody needs to be able to make decisions and do it, and mom has shown me that she can'tshe can't do it. She just can't do it. Dad can. And I don't have any indication from father that he really is interested in keeping mother out of this child's life. I feel he would insure that she had contact and that she would be able to maintain a relationship.
But as far as them agreeing on things and talking about things and really sharing this child, it's not happening. Somebody has got to be able to make decisions, reasonable responsible decisions for the child. In my opinion, that's dad.
On cross examination, the expert added, "Now the sole custody is because mom has been totally, in my mind, intractable on the issue for three and a half years after having lots of professional intervention [from the expert and two parenting coordinators]...."
Idaho Code § 32-717B(1) states, "The court may award either joint physical custody or joint legal custody or both as between the parents or parties as the court determines is for the best interests of the minor child or children." Subsection (4) of the statute provides, insofar as is relevant to this case, that "absent a preponderance of the evidence to the contrary, there shall be a presumption that joint custody is in the best interests of a minor child or children."
The magistrate court awarded sole legal custody of the parties' son to Father. The reason for doing so was as follows:
The court is not persuaded that [Mother] understands her dysfunctional role in these problems; or has, at present, the maturity to change it. The court wishes to implement the statutory preference for joint custody, but the court also believes that children should be raised by mature adults, and concludes that [the child's] best chance for such a parent-child relationship is at present in the home of his father. Sole legal custody with [Father] also gives [the child] his best chance for a proper, "joint custody" relationship with both of his parents.
Mother challenges the award of sole legal custody to Father, arguing, "People get divorced because they can't get along. If the law says that people that don't get along can't have joint custody, we have just eliminated joint custody from Idaho's law. This is not the intent of Idaho's joint custody presumption."
The magistrate did not grant sole legal custody to Father merely because the parties "don't get along." The magistrate had evidence of Mother's three and one-half years of *780 intransigence. In addition to evidence of various instances of Mother's conduct, the custodial expert testified:
The mom's behavior is intractable inability to change these dysfunctional patterns that is in her interest to change. She simply, they seem to be out of her grasp. She has this need for drama, dramatic attention to be brought to herself, to be the center of attention. She engages in provocative behaviors, behaviors to enlist argumentative responses. She shifts in her emotional presentation. She's often coy and coquettish, and then goes to being a victim, victimized, to being imperious in her presentation. And there is an aspect that seems to enjoy the litigious nature in keeping the matter focused and in the forefront. These are all kind of behavioral indicators that something is going on.
"It is the province of the trial court to weigh conflicting evidence and to judge the credibility of witnesses." King v. King, 137 Idaho 438, 442, 50 P.3d 453, 457 (2002). The magistrate's findings are supported by substantial and competent evidence. Mother has not shown that the magistrate erred in relying upon the expert's testimony or that, under the circumstances of this case, he abused his discretion by awarding Father sole legal custody of the parties' son.

B. Is Father Entitled to an Award of Attorney Fees on Appeal?
Father seeks an award of attorney fees on appeal pursuant to Idaho Code § 12-121. Attorney fees can be awarded on appeal under that statute only if the appeal was brought or defended frivolously, unreasonably, or without foundation. Gustaves v. Gustaves, 138 Idaho 64, 71, 57 P.3d 775, 782 (2002). An award of attorney fees is appropriate if the appellant simply invites the appellate court to second-guess the trial court on conflicting evidence. Mother's appeal is driven by her dissatisfaction with the magistrate's factual findings and exercise of discretion, and she has done little more than invite this Court to second-guess those findings and that exercise of discretion. Consequently, we award Father attorney fees on appeal. Reed v. Reed, 137 Idaho 53, 62, 44 P.3d 1108, 1117 (2002).

IV. CONCLUSION
We affirm the order of the magistrate court. We award costs, including attorney fees, to respondent.
Justices BURDICK, J. JONES, W. JONES and HORTON concur.
NOTES
[1]  The trial was originally scheduled for two days. When it was not concluded within that time frame, the court and counsel had to find additional available dates for completing the testimony, which were four days in December.
