
143 Wis.2d 166 (1988)
420 N.W.2d 414
IN RE the MARRIAGE OF: Sharon K. PERGOLSKI, Petitioner-Appellant-Cross-Respondent,
v.
George L. PERGOLSKI, Respondent-Cross-Appellant.
No. 87-0593.
Court of Appeals of Wisconsin.
Submitted on briefs December 1, 1987.
Decided January 19, 1988.
*168 For the appellant there were briefs submitted by James M.D.R. Hawkins, of Wausau.
For respondent there was a brief submitted by James B. Connell of Crooks, Low & Connell, S.C., of Wausau.
Before Cane, P.J., LaRocque and Myse, JJ.
LaROCQUE, J.
Sharon Pergolski appeals a divorce judgment denying her permission to remove her children from Wisconsin. George Pergolski cross-appeals the decision granting Sharon custody. Sharon also claims that the court erred by assigning George an income tax dependency exemption without her consent and by ordering reduced child support if she relocates more than fifty miles from Wausau. We affirm the judgment in all respects except one: The contingent reduction of child support is reversed and remanded for further consideration.
George and Sharon were originally divorced with a stipulation awarding Sharon custody of their two sons, then ages four and seven. Within one week of the divorce, Sharon announced to George that she intended to move immediately to Medford, Oregon, with the boys. George filed an order to show cause and, after a hearing, the court vacated the divorce judgment and set the matter for trial.
After trial, the court awarded Sharon custody but denied her permission to remove the children from the state, finding that the "primary purpose for removal is to impede [George's] visitation rights and that such a removal would significantly harm or impede the *169 children's relationship with [George] and such harm or impediment will work to the child[ren]'s detriment.[1] The court further ordered Sharon to execute necessary consent forms to allow George to claim one child as an exemption for income tax purposes. The court then set child support in accord with statutory guidelines, but provided that if Sharon moves beyond fifty miles from Wausau, payment will be reduced twenty-three cents per week for every mile between her residence and Wausau, regardless of how often George exercises visitation.

CUSTODY
If the custody award were reversed, Sharon's appeal would be moot. We therefore discuss the crossappeal first. George contends that the court awarded custody partially on the basis of the sex of the custodial parent. In its decision from the bench, the court stated: "And, of course, all other things being equal, children this age normally then would probably go to their mother."
Gender bias is no longer acceptable as a basis for settling custody disputes in Wisconsin. In early common law, a father had the paramount right to the custody of his children. See Jensen v. Jensen, 168 Wis. 502, 504, 170 N.W. 735, 735 (1919). Later, the court determined that with regard to children of tender years, preference was ordinarily given to the mother, other things being equal. Id. at 504, 170 N.W. at 736.
In 1971, the legislature added the following language to then sec. 247.24, Stats.:

*170 In determining the parent with whom a child shall remain, the court shall consider all facts in the best interest of the child and shall not prefer one parent over the other solely on the basis of the sex of the parent. (Emphasis supplied.)
In Scolman v. Scolman, 66 Wis. 2d 761, 766, 226 N.W.2d 388, 390 (1975), Chief Justice Wilkie interpreted this amendment as adding nothing to prior case law, stating:
[S]ec. 247.24(3), Stats., does not strike down the holdings of this court indicating that, other things being equal, there is usually a preference for the mother. The trial court may properly find that young children are better off with their mother. The statute merely decrees what the law in Wisconsin is already, that the trial court's decision cannot solely be based on the sex of the parent.
However, in 1977 the legislature went a step further, inserting as a preface to what is now sec. 767.24(2), Stats.:
In making a custody determination, the court shall consider all facts in the best interest of the child and shall not prefer one potential custodian over the other on the basis of the sex of the custodian.[2]
[1]
Thus, contrary to the state of the law at the time of Scolman, trial courts may no longer consider the sex of the parent when making a custody decision. The *171 present rule was not violated here. While it is true that the court's remarks from the bench spoke of maternal preference, it did so in context of "all other things being equal." The court, however, went on to explain why, although close, all other things were not equal in this case. Any indication of maternal preference was more in the nature of a hypothetical aside and not part of the ratio decidendi.
The court's decision was based upon: the children's ages; the desirability of continuity of custody; which parent was best suited to provide discipline, care, services, and moral development; the parties' social prejudices; availability of extended family relations; and financial ability to support. While the court found the parties relatively equal in most aspects of parenting ability, Sharon was given the edge in several respects, especially in her ability to provide care and services as evidenced by past history. Finally, the court's custody decision was supported by the social worker's testimony, the custody investigation report, and the guardian ad litem's recommendations.

REMOVAL FROM WISCONSIN
[2]
Sharon argues that the court erred by denying her permission to remove with the children from the state. A removal determination, like a custody determination, is committed to the sound discretion of the trial court. Long v. Long, 127 Wis. 2d 521, 526, 381 N.W.2d 350, 353 (1986). In order to deny permission to remove, the court must find that removal is against the children's best interests. Id. at 528, 381 N.W.2d at 354.

*172 [A] finding under sec. 767.245(6), Stats.... that an out-of-state move will be against the child's best interests requires a finding that removal and alternative visitation arrangements will significantly harm or impede the child's relationship with the noncustodial parent and that this harm to the relationship will work to the child's detriment. If the custodial parent's primary purpose for the removal is to defeat or impede visitation, the removal is against the best interests of the child.
Id. at 534-35, 381 N.W.2d at 357.
Here, the court made a finding that removal was against the boys' best interests and that it would significantly harm their relationship with George and would work to the boys' detriment. It also found that Sharon's principal purpose for removal was to impede visitation.
[3]
The court's finding regarding Sharon's purpose for removal was not clearly erroneous. See sec. 805.17(2), Stats. She did not reveal her intentions until immediately after the divorce hearing and just days before the move. Within one week of the original trial, she quit her job and shipped her furniture and belongings to Oregon. Her boyfriend had been in Oregon since sometime before the hearing and had quit his job to relocate. Sharon had stated that if she was denied removal, she would move someplace else in the state despite having a good job and family in the Wausau area. These facts support the court's findings. We conclude that the court did not abuse its discretion by denying permission for removal.

INCOME TAX EXEMPTIONS
Sharon also argues that the court did not have authority to order execution of consent forms assigning *173 George an income tax dependency exemption. We disagree. 26 U.S.C.A. § 152(e) (West Supp. 1987) automatically allocates dependency exemptions to the custodial parent unless he or she signs a waiver that the noncustodial parent attaches to his or her tax return. The legislative history indicates that congress provided for automatic allocation to alleviate the burden on the IRS caused by fact-finding determinations. Fudenberg v. Molstad, 390 N.W.2d 19, 21 (Minn. Ct. App. 1986).
[4]
Fudenberg, 390 N.W.2d at 21, upheld the trial court's authority to allocate the exemption because it "does not interfere with Congressional intent. It does not involve the IRS in fact-finding determinations. State court involvement has no impact on the IRS." Similarly, Lindsey v. Lindsey, 140 Wis. 2d 684, 412 N.W.2d 132 (Ct. App. 1987), authorizes trial courts to order a spouse to make a specific election regarding a retirement system payout option even though the system may not allow the court to enter an order directed to the administrator of the plan. We conclude that the court properly exercised its discretion by ordering Sharon to execute the consent giving the tax exemption to George.

REDUCED CHILD SUPPORT
[5, 6]
Finally, we conclude that the court abused its discretion by reducing child support if Sharon moves more than fifty miles from Wausau, twenty-three cents per week for every mile between Wausau and her residence. Child support determinations rest within the sound discretion of the trial court and will not *174 be reversed unless there is an abuse of discretion. Edwards v. Edwards, 97 Wis. 2d 111, 116, 393 N.W.2d 160, 163 (1980). Section 767.25(1m)(em), Stats., allows the court to consider extraordinary travel expenses incurred in exercising visitation rights in modifying child support payments.
[7]
Although the support modification was an admirable attempt to reduce future court costs and legal fees, its basis was arbitrary. The order applies regardless of how often George exercises visitation. The order assumes that George would continue to visit the boys each week no matter where they lived. Any reduction in child support should bear a relation to actual travel. We therefore remand the support modification either to reflect actual expenses or in some other equitable fashion compensate for expenses of visitation.
By the Court.Judgment affirmed in part, reversed in part, and cause remanded with directions. No costs on appeal.
NOTES
[1]  No issue is raised with regard to vacating the original divorce judgment. For purposes of standard of review, the court's decision is treated as an original and not a modified judgment.
[2]  Section 37, ch. 105, Laws of 1977. In 1979, the statutes were renumbered, sec. 247.24(3) as it had existed up to that time was repealed, and sec. 247.24(1m) was incorporated into sub. (2) as the introduction. Sections 25 and 27, ch. 196, Laws of 1979. See sec. 767.24(2), Stats.
