
16 So.3d 109 (2009)
Susan Smith ODOM
v.
Shane SMITH.
2070758.
Court of Civil Appeals of Alabama.
February 6, 2009.
*110 C. ChaLea Tisdale, Opp, for appellant.
Debbie Lindsey Jared of Jared & Brunson, Elba, for appellee.
THOMAS, Judge.
Susan Smith Odom ("the mother") appeals from the trial court's judgment in favor of Shane Smith ("the father") modifying custody and child support with respect to their two minor children.

Facts and Procedural History
On November 14, 2006, the father and the mother entered into a settlement agreement providing that the parties *111 would have joint legal custody of their two minor children, that the mother would have primary physical custody, and that the father would pay $550 per month in child support. On February 23, 2007, the trial court entered a final judgment of divorce that incorporated the custody and child-support provisions of the parties' settlement agreement. On February 25, the father delivered the children to the mother's home when his visitation period ended. The parties entered into an argument culminating in the children's returning home with the father. A few days later, the parties orally agreed that the children would live with the father and that the mother would exercise the visitation rights in the settlement agreement that were originally granted to the father. The father did not pay to the mother any child support during the time the children lived with him.
On April 11, the father petitioned the trial court to modify its original custody order, requesting that the trial court grant him primary physical custody of the children. In response, the mother moved the trial court to hold the father in contempt for nonpayment of child support. On October 9, the trial court conducted an initial hearing and entered an order returning custody to the mother and establishing a date for a final hearing.
On November 1, the trial court held a final hearing on the father's petition to modify custody and on the mother's motion to hold the father in contempt for failure to pay child support. After hearing evidence ore tenus, the trial court entered an order, which stated in relevant part:
"The [father] shall have sole care, custody and control of the parties['] minor children ... with the [mother] having supervised visitation at all times and places as the parties can agree, until such time as she has a fit place to live with running water and electricity at which time [the mother's] visitation shall be unsupervised ....
"....
"Neither party owes to the other any arrears in child support."
The mother now appeals to this court.

Issues
The mother presents two issues on appeal: (1) whether the trial court erred when it determined that the father did not owe a child-support arrearage and (2) whether the trial court had before it sufficient evidence to support its judgment modifying custody of the parties' two minor children.

Standard of Review
"`When this Court reviews a trial court's child-custody determination that was based upon evidence presented ore tenus, we presume that the trial court's decision is correct: "`A custody determination of the trial court entered upon oral testimony is accorded a presumption of correctness on appeal, and we will not reverse unless the evidence so fails to support the determination that it is plainly and palpably wrong ....'"'
"Ex parte Fann, 810 So.2d 631, 633 (Ala. 2001) (quoting Ex parte Perkins, 646 So.2d 46, 47 (Ala.1994), quoting in turn Phillips v. Phillips, 622 So.2d 410, 412 (Ala.Civ.App.1993)). `This Court reviews questions of law de novo.' Alabama State Bar v. Caffey, 938 So.2d 942, 945 (Ala.2006) (quoting Tipler v. Alabama State Bar, 866 So.2d 1126, 1137 (Ala. 2003))."
Ex parte Cleghorn, 993 So.2d 462, 465 (Ala.2008).


*112 Analysis

First, the mother argues that the trial court erred when it determined that the father did not owe a child-support arrearage because, she argues, "child support becomes a final judgment on the date it is due, and may be collected as other judgments, together with interest," Appellant's brief at 10 (citing Osborne v. Osborne, 57 Ala.App. 204, 326 So.2d 766 (1976)).
However, "`[a]lthough child support payments are final judgments as of the date they accrue, we have allowed offsets to be made in instances where a child lived with the [noncustodial parent] at the time of accrual and the [noncustodial parent] was able to prove that he made contributions to the child's support.' Lewis v. Winslow, 587 So.2d 1006, 1008 (Ala.Civ.App.1991) (citations omitted). `The award or denial of a credit against an arrearage is within the sound discretion of the trial court.' Phillippi v. State ex rel. Burke, 589 So.2d 1303, 1304 (Ala.Civ.App.1991) (citation omitted)."
Thompson v. Thompson, 650 So.2d 928, 930 (Ala.Civ.App.1994).
"[A]n obligated parent can prove his or her entitlement to a credit equal to the amount of child support due in a specified period by introducing evidence that the child primarily lived with the obligated parent during that period, that the obligated parent provided all of the child's support during that period, and that the custodial parent provided none of it."
Pardue v. Pardue, 917 So.2d 857, 861 (Ala. Civ.App.2005).
In this case, the father testified that the children had lived with him from February 25, 2007, until the trial court entered its order on October 9, 2007. The father further testified that, during that period, he had provided food, shelter, clothing, and for all the children's other needs and that the only support the mother had provided during that period was the purchase of some school supplies. The mother testified that, during that period, she had purchased for the children school supplies and some clothing of undetermined value. The trial court could have concluded from the evidence before it that the father had provided substantially all the children's support while they lived with him. Therefore, the trial court did not err to reversal when it determined that the father did not owe the mother a child-support arrearage, and its judgment on this issue is due to be affirmed.
Second, the mother argues that the trial court erred when it modified custody by awarding the father primary physical custody of the children.
"[The Alabama Supreme Court's] decision in Ex parte McLendon [,455 So.2d 863 (Ala.1984),] provides that a party seeking a change in custody must show that the change `will materially promote [the] child's welfare.' 455 So.2d at 865. The McLendon standard is a `rule of repose,' meant to minimize disruptive changes of custody because this Court presumes that stability is inherently more beneficial to a child than disruption. Ex parte McLendon, 455 So.2d at 865. It is founded on the longstanding principle that `[i]t is the court's duty to scrupulously guard and protect the interests of children. And in the context of child-custody proceedings, the dominant consideration is always the best interest of the child.' Ex parte Fann, 810 So.2d 631, 638 (Ala.2001)."
Ex parte Cleghorn, 993 So.2d at 468.
"`The [McLendon standard] requires that the party seeking modification prove to the court's satisfaction that *113 material changes affecting the child's welfare since the most recent decree demonstrate that custody should be disturbed to promote the child's best interests. The positive good brought about by the modification must more than offset the inherently disruptive effect caused by uprooting the child.'"
Ex parte McLendon, 455 So.2d 863, 865 (Ala.1984) (quoting Wood v. Wood, 333 So.2d 826, 828 (Ala.Civ.App.1976)). In this case, the evidence showed that, at the time of the final hearing, the mother lived in a mobile home that lacked electricity and hot water. The mother would "pop [the children] in the mouth," had difficulty controlling the children's behavior, and the children did not get along with her live-in boyfriend. In contrast, the children had a good relationship with the father and his new wife. The children also earned higher grades in school and had better attendance records after they began living with the father. Additionally, the mother and the father both testified that the children, who were 10 and 13 years old at the time of the final hearing, preferred to live with the father. "Although the child's preference is not controlling, it is an important factor for the trial court to consider in a custody modification case." S.R. v. S.R., 716 So.2d 733, 735-36 (Ala.Civ.App.1998). The trial court could have found from this evidence that the mother's living situation constituted a material change since the entry of the court's initial custody determination and that a change in custody would "`materially promote [the children's] welfare.'" McLendon, 455 So.2d at 865 (quoting Greene v. Greene, 249 Ala. 155, 157, 30 So.2d 444, 445 (1947)). Therefore, we cannot say that the evidence before the trial court failed to support the trial court's judgment so as to render it plainly and palpably wrong, and we affirm the trial court's judgment on this issue as well.

Conclusion
Because we hold that the trial court did not err to reversal when it determined that the father did not owe a child-support arrearage or when it awarded the father primary physical custody of the children, we affirm the trial court's judgment.
AFFIRMED.
THOMPSON, P.J., and PITTMAN, BRYAN, and MOORE, JJ., concur.
