The Racine Family Court Commissioner (commissioner) appeals an order in which the *533trial court interpreted sec. 767.329, Stats., to mandate that the trial court approve a stipulated postjudgment custody transfer without inquiring into the best interests of the child. Because this court concludes that sec. 767.329 does not mandate court approval of a stipulated postjudgment custody transfer without examining the best interests of the child, we reverse and remand for further proceedings.
M.E. and S.A. are the unmarried parents of S.A. II. In November 1985, a paternity action established S.A.'s paternity, fixed support and awarded custody. The action resulted in the custody and primary physical placement of S.A. II with M.E., the child's mother. In May 1990, S.A. II began living with his father, S.A. In December 1990, pursuant to a stipulation between the parents, S.A. moved the trial court to modify the earlier judgment and transfer custody and primary physical placement of S.A. II to S.A. The trial court granted this request and ordered the previous judgment amended to reflect the parents' stipulation.
Subsequently, the commissioner moved the court to reconsider the stipulation and order because, inter alia, the order did not include information on the best interests of S.A. II and the trial court did not appoint a guardian ad litem.1 S.A. objected that, inter alia, sec. 767.329, Stats., mandated the court to incorporate the stipulation into the amended judgment, that sec. 767.045(1)(a) 1, Stats., did not allow a guardian ad litem appointment, and that the commissioner was prohibited *534from intervening. The trial court appointed a guardian ad litem and stayed the proceedings for the custody investigation.
The commissioner then moved the trial court to declare sec. 767.329, Stats., unconstitutional. The commissioner claimed that the statute impeded the family court's duty to the public and to the children involved in family court matters. The commissioner also claimed that children in postjudgment custody transfer stipulations are treated differently than children in prejudgment custody stipulations. The commissioner argued that the statute violated the separation of powers doctrine and denied equal protection to children in stipulated postjudgment custody transfer.
The trial court held that sec. 767.329, Stats., is unambiguous and interpreted the statute to mandate that the trial court approve a stipulated postjudgment custody transfer. The trial court read the statute to prohibit it from examining the best interests of the child, to prohibit it from allowing the commissioner to intervene, and to prohibit it from appointing a guardian ad litem.2 The trial court found the statute constitutional. The commissioner appeals.
The central issue on appeal involves the interpretation of sec. 767.329, Stats. This presents a question of law and the reviewing court owes no deference to the trial court's conclusion. Sprague v. Sprague, 132 Wis. 2d 68, 71, 389 N.W.2d 823, 824 (Ct. App. 1986).
Section 767.329, Stats., reads:
If after an initial order is entered under s. 767.24, the parties agree to a modification in an order of physical *535placement or legal custody and file a stipulation with the court that specifies the agreed upon modification, the court shall incorporate the terms of the stipulation into a revised order of physical placement or legal custody. [Emphasis added.]
Whether a statute is mandatory is a question of statutory construction. Cross v. Soderbeck, 94 Wis. 2d 331, 340, 288 N.W.2d 779, 783 (1980). The aim of statutory construction is to ascertain the legislative intent. State v. R.R.E., 162 Wis. 2d 698, 707, 470 N.W.2d 283, 286 (1991). It is presumed that "shall" is mandatory when it appears in the statute unless a different construction is necessary to carry out the clear legislative intent. In re C.A.K., 154 Wis. 2d 612, 621, 453 N.W.2d 897, 901 (1990). A per se rule does not govern whether "shall" is mandatory or directory. R.R.E., 162 Wis. 2d at 707, 470 N.W.2d at 286. In this case, the relevant consideration in choosing the proper construction of "shall" is the consequences that would follow from the alternative interpretation. See Cross, 94 Wis. 2d at 340-41, 288 N.W.2d at 783.3
The trial court stated that it was compelled to read sec. 767.329, Stats., as unambiguous and as mandating that it approve the stipulation without examining the best interests of the child. However, if a literal construction leads to absurd, unreasonable or unjust results, a construction not subject to such infirmities will be *536adopted in order to carry out the legislative intent. State v. Retail Gasoline Dealers Ass'n, 256 Wis. 537, 544, 41 N.W.2d 637, 641 (1950). Thus, in an appropriate case, we can conclude that "shall" is intended to be construed as "may." See State ex rel. Werlein v. Elamore, 33 Wis. 2d 288, 293-94, 147 N.W.2d 252, 255 (1967).
Here we conclude the consequences would be absurd if sec. 767.329, Stats., were read to prohibit an examination of the best interests of the child. The best interests of the child is the primary consideration in custody determinations for both divorce actions and paternity actions. See secs. 767.24(5) and 767.51(6), Stats. The public interest in promoting the best interests of the child in custody matters is always the dominant concern. Kuesel v. Kuesel, 74 Wis. 2d 636, 639, 247 N.W.2d 72, 73 (1976). The best interests of the child are not always the primary concern of the parties and it is the child's welfare, not the parties' wishes, that are at stake. See Weichman v. Weichman, 50 Wis. 2d 731, 736, 184 N.W.2d 882, 885 (1971). Thus, the best interests of the child transcend the parties' stipulation. Ondrasek v. Tenneson, 158 Wis. 2d 690, 695, 462 N.W.2d 915, 917 (Ct. App. 1990). We cannot conclude that the public's interest in the best interests of the child are no longer relevant in a postjudgment custody transfer simply because there is a stipulation.
Further, sec. 767.10, Stats., provides that the parties to a divorce may stipulate to the child's legal and physical custody prior to the judgment. The trial court's approval of the stipulation, however, is subject to an examination of the factors in sec. 767.24, Stats.4 The *537stipulation between the parties in a divorce action is a recommendation jointly made to the court suggesting what the judgment should provide. Bliwas v. Bliwas, 47 Wis. 2d 635, 638, 178 N.W.2d 35, 37 (1970). While parents may stipulate to custody, the agreement should not be approved by the court unless it insures and promotes the best interests of the children. King v. King, 25 Wis. 2d 550, 555, 131 N.W.2d 357, 360 (1964). A family court is not bound to accept a stipulation; the trial court has the right to make such modifications that interests of the children may require. Bliwas, 47 Wis. 2d at 639, 178 N.W.2d at 37. If the stipulation is inadequate, the court could undoubtedly provide its own equitable provisions. Schmitz v. Schmitz, 70 Wis. 2d 882, 886, 236 N.W.2d 657, 660 (1975). We cannot conclude that stipulations in postjudgment custody transfers should limit the trial court's powers any more than stipulations in prejudgment proceedings.5
In construing a statute, related sections are considered in its construction or interpretation. State v. Clausen, 105 Wis. 2d 231, 244, 313 N.W.2d 819, 825 (1982). Section 767.01(1), Stats., states that the trial court has "authority to do all acts and things necessary and proper . . .." This discretion would be partially nullified if sec. 767.329 were read as mandatory for postjudgment custody transfers. A mandatory reading would reduce the trial court to a rubber-stamping role. The Wisconsin Supreme Court recently stated that:
*538[A]s a family court, the trial court represents the interests of society in promoting the stability and best interests of the family. It is [the trial court's] task to determine what provisions and terms would best guarantee an opportunity for the children involved to grow to mature and responsible citizens, regardless of the desires of the respective parties. This power, vested in the family court, reflects a recognition that children involved in [an action affecting the family] are always disadvantaged parties and that the law must take affirmative steps to protect their welfare.
Abitz v. Abitz, 155 Wis. 2d 161, 177, 455 N.W.2d 609, 616 (1990) (quoting Kritzik v. Kritzik, 21 Wis. 2d 442, 448, 124 N.W.2d 581, 585 (1963)). Therefore, we cannot conclude that the legislature intended sec. 767.329 to limit the trial court's authority to rubber-stamping.
Furthermore, under sec. 767.11(12)(a), Stats., the trial court has the discretion to refuse to accept a stipulation reached by mediation or the help of professionals. It would be inconsistent to prohibit the trial court from reviewing or refusing a stipulation not reached by mediation or the help of professionals. This result is clearly contrary to the legislature's concern in ch. 767, Stats., to consider the best interests of the child.
Additionally, the effect of a strict reading would allow the parties involved in a custody transfer to usurp the trial court's judgment. For example, in an initial custody determination, the trial court must examine the best interests of the child. Sections 767.24(5) and 767.51(6), Stats. If mediation is involved, the trial court may approve or reject the parties' agreement based on the best interests of the child. Section 767.11(12)(a), Stats. If sec. 767.329, Stats., is read to prohibit an examination of the best interests of the child and mandate a *539stipulation's approval, then the parties unsatisfied with the trial court's initial determination or the results of mediation could force the trial court to adopt their position through a postjudgment stipulation. The parties' stipulation would effectively oust the trial court of its power to determine custody in the best interests of the child. See Schmitz, 70 Wis. 2d at 887, 236 N.W.2d at 660. We cannot believe the legislature intended this result.6
S.A. argues that our reading of sec. 767.329, Stats., would require the trial court to conduct a hearing before approving each stipulation.7 S.A. overstates the effect of our decision. Our holding is consistent with our earlier decision that the trial court is not required to hold an evidentiary hearing and make findings of fact and conclusions of law when the parties stipulate to an order transferring custody. See Luhman v. Beecher, 144 Wis. 2d 781, 782-83, 424 N.W.2d 753, 753 (Ct. App. 1988). We do not hold that the trial court is required to hold hearings. We hold that sec. 767.329 does not prohibit the trial court from examining the stipulation for the best interests of the child.8 We cannot believe that the legis*540lature intended any other interpretation.9
Because we conclude that sec. 767.329, Stats., does not mandate the trial court to approve the parties' stipulation, we conclude that the commissioner may intervene in sec. 767.329 proceedings. We do so for two reasons. First, sec. 767.14, Stats., plainly gives the commissioner a right to intervene. The statute reads:
In any action affecting the family, each party shall . . . serve a copy of [the petition] upon the family court commissioner of the county in which the action is begun, whether such action is contested or not. No judgment in any such action shall be granted unless this section is complied with except when otherwise ordered by the court. Such commissioner may appear in an action under this chapter when appropriate; and shall appear when requested by the court.
Id. (emphasis added). A custody determination is one affecting the family. Section 767.02(l)(e), Stats. Because postjudgment custody transfers are under ch. 767, Stats., the commissioner may intervene.10
*541Second, the public interest requires that the commissioner have the opportunity to be involved in actions affecting the family. S.A. and M.E. invoked the judicial process to establish S.A.'s paternity, fix support and award custody. The public has an interest in seeing that the child's paternity is determined accurately, that welfare costs are cut by requiring the true father to contribute to the child's support, and that paternity actions are disposed of efficiently. State v. A.W.O., 117 Wis. 2d 120, 128-29, 344 N.W.2d 200, 204 (Ct. App. 1983).
The Wisconsin Supreme Court recognized that the public's interest must always be taken into account in actions affecting the family. See Bottomley v. Bottomley, 38 Wis. 2d 150, 158, 156 N.W.2d 447, 451 (1968). The commissioner has the heavy duty and responsibility of representing the public interest in every action affecting the family. Id. at 158-59, 156 N.W.2d at 451. The commissioner's right to appear on behalf of the public is important to protect the public's interests. Id. Thus, the commissioner's involvement cannot be thwarted and the public's interest cannot be lessened merely because the parties have entered into a stipulation.11 We conclude that the commissioner had a right to intervene and challenge the trial court's postjudgment custody transfer on the public's behalf.12
*542We also conclude that because sec. 767.329, Stats., does not prohibit the trial court from examining the best interests of the child, sec. 767.045(l)(a)l, Stats., becomes relevant. When the trial court finds it necessary to examine the best interests of the child in a motion to transfer custody, it must appoint a guardian ad litem if it has reason for special concerns as to the child's welfare. Id Representation is obligatory whenever the child's welfare is put directly in issue. Bahr v. Galonski, 80 Wis. 2d 72, 82, 257 N.W.2d 869, 874 (1977). Therefore, we conclude that sec. 767.329 does not prohibit the trial court from appointing a guardian ad litem.
We remand this cause to the trial court to address the commissioner's motion to intervene and the commissioner's challenge as to whether the parents' stipulation serves the best interests of S.A. II.
By the Court. — Order reversed and cause remanded with directions.
The other grounds for the commissioner's motion were that the order failed to provide for child support, the stipulation was neither served upon nor approved by the commissioner, the order split placement between the parents and made both parents eligible for Aid to Families with Dependent Children, and the state was not made a party to the proceedings.
The guardian ad litem did not discuss the results of the investigation at the hearing.
Other factors used to interpret "shall" include the objective sought to be accomplished by the statute, its history and whether a penalty is imposed for its violation. Cross v. Soderbeck, 94 Wis. 2d 331, 340-41, 288 N.W.2d 779, 783 (1980). It is not necessary to analyze each factor in each case. See Worachek v. Stephenson Town School Dist., 270 Wis. 116, 120, 70 N.W.2d 657, 659 (1955).
The same analysis holds true for paternity actions. A paternity judgment and a divorce judgment utilize the same factors for determining custody. See secs. 767.51(6) and 767.24, Stats. Thus, *537a custody stipulation in a prejudgment paternity action would be subject to the approval of the trial court.
Nor has S.A. demonstrated to this court that in creating sec. 767.329, Stats., the legislature intended to alter the long line of Wisconsin decisions giving a trial court the discretion in incorporating a stipulation into an order or judgment. .
Furthermore, it is quite possible that the parties may stipulate to a custody arrangement violative of public policy. See, e.g., Ondrasek v. Tenneson, 158 Wis. 2d 690, 462 N.W.2d 915 (Ct. App. 1990). We refuse to read sec. 767.329, Stats., to require the trial court to adopt in an order or judgment a provision against public policy.
S.A. also argues that our decision will discourage parties from placing custody modifications in the record. Because we hold that the trial court is not required to hold a hearing, parties should not be discouraged from entering into stipulations modifying custody orders and having them entered into the record.
We stress that even though the court is not required to *540conduct a hearing, the court's role in adopting stipulations is more active and thorough than rubber-stamping the stipulation.
Because this court concludes that sec. 767.329, Stats., does not prohibit the trial court from examining the best interests of the child, we do not need to discuss the constitutional issues raised by the commissioner.
Section 767.14, Stats., requires that in any action affecting the family, the commissioner is to receive the petition whether or not the proceeding is contested. If sec. 767.329, Stats., is read to prevent the commissioner's intervention, then the requirement to serve uncontested petitions to the commissioner would be superfluous. A statute should be construed so that no word or clause shall be rendered surplusage and every word, if possible, should be *541given effect. Donaldson v. State, 93 Wis. 2d 306, 315, 286 N.W.2d 817, 821 (1980).
Furthermore, the legislature must have intended the commissioner to have the opportunity to represent the public interest in uncontested, or stipulated, custody transfers. Otherwise, there would be no reason to serve the commissioner with pleadings and petitions in an uncontested transfer. See sec. 767.14, Stats.
The commissioner has a right to pursue this appeal. See *542Bottomley v. Bottomley, 38 Wis. 2d 150, 158-59, 156 N.W.2d 447, 451 (1968).