The plaintiff, Brenda J. Timm, brought this action to dissolve her marriage to George W. Timm. On April 28,1983, the case was tried before Hon. Eli L. Cramer, state trial referee. Prior to the *203commencement of trial and on at least one occasion during the course of trial, conferences between the parties and the trial referee took place during which suggestions were made by the court for settlement. No objection was made to these conferences before or during trial, and neither party moved that the trial referee disqualify himself or declare a mistrial. There is no record of the discussions that took place at these conferences. On May 5, 1983, the court ordered that the defendant pay as unallocated alimony and child support the sum of $400 per week. The court further ordered that alimony terminate after three years but that child support payments continue to be made in the amount of $150 per week for each of the Timms’ two minor children. Finally, the court gave the plaintiff sole custody of the two children, finding that the parties had not stipulated to a joint custody agreement and that it would be in the children’s best interest to be placed with the mother. The defendant, George W. Timm, appeals from the trial court’s decision, raising three issues: (1) whether any prejudicial predisposition on the part of the trial referee existed as a result of the pretrial conferences; (2) whether the evidence supported the trial court’s child support order; and (3) whether the court erred in failing to award joint custody. We find no error.
I
On the issue of trial court predisposition the defendant alleges that the several settlement conferences held before and during trial may have caused the trial referee to become so predisposed that he should have disqualified himself.1 The defendant relies upon Krattenstein v. G. Fox & Co., 155 Conn. 609, 236 A.2d *204466 (1967), for the proposition that it is at all times improper for a trial judge to participate in pretrial settlement conferences and thereafter to try the case. “When . . . a judge engages in a chambers conference looking to the settlement of a case . . . in which he will be called upon to decide the issues of liability and damages ... [i]t is ... impossible to avoid questions as to whether the judge can disregard . . . matters disclosed in the conference . . . and whether a preliminary judgment, formed at the conference and predicated on unsubstantiated claims of proof, may have some subtle influence on a final judgment after a full hearing. ... It is inevitable that the basis is laid for suspicion, no matter how unfounded or unjustified it may be, and that failure to concur in what the judge may consider an adequate settlement may result in the imposition, upon a litigant or his counsel, of some retributive sanction or the incurrence of judicial displeasure.” Krattenstein v. G. Fox & Co., supra, 614-15.
When a civil case is to be tried before a jury, participation by the trial judge in pretrial settlement discussions is not likely to be raised as an issue for the purpose of disqualification of the judge. When a judge engages in a pretrial settlement discussion in a court case, he should automatically disqualify himself from presiding in the case in order to eliminate any appearance of impropriety and to avoid subtle suspicions of prejudice or bias. Canons 2, 3 (C) (1), Code of Judicial Conduct. If, however, all parties agree on the record, and stipulate that the judge may preside, then the infirmity is cured. See General Statutes § 51-39 (c) (“When any judge is disqualified to act in any proceeding before him, he may act if the parties thereto consent in open court.”).
In the present case, although the parties did not expressly agree that the trial referee could preside, there is no evidence that defense counsel objected to *205these conferences or sought his disqualification. The issue was raised for the first time on appeal. The defendant attempts to justify his failure to refuse to participate in the settlement conferences, and his failure to file a motion for mistrial on the ground that any demurrer would have placed him in the untenable position of risking the court’s denial of the motion and incurring the animosity or displeasure of the court. There is, however, neither a claim nor the slightest indication that the trial referee insisted on these conferences or that he might have become belligerent or angry if either party had objected to them. The record is devoid of any suggestion of actual impropriety or bias on the part of the referee. The conduct of the defendant in this case, in failing to raise the issue of the referee’s disqualification either before or during the trial, can be construed as the functional equivalent of “consent in open court” to Judge Cramer’s presiding over the trial. See General Statutes § 51-39 (c); State v. Kohlfuss, 152 Conn. 625, 631, 211 A.2d 143 (1965). As this court in Krattenstein v. G. Fox & Co., supra, stated: “We have made it clear that we will not permit parties to anticipate a favorable decision, reserving a right to impeach it or set it aside if it happens to be against them, for a cause which was well known to them before or during the trial. ‘We have repeatedly indicated our disfavor with the failure, whether because of a mistake of law, inattention or design, to object to errors occurring in the course of a trial until it is too late for them to be corrected, and thereafter, if the outcome of the trial proves unsatisfactory, with the assignment of such errors as grounds of appeal.’ State v. Grimes, 154 Conn. 314, 323, 228 A.2d 141 [1966]; State v. DeGennaro, 147 Conn. 296, 304, 160 A.2d 480, cert. denied, 364 U.S. 873, 81 S. Ct. 116, 5 L. Ed. 2d 95 [1960].” Krattenstein v. G. Fox & Co., supra, 616.
*206II
The second issue raised by the defendant challenges the court’s conclusion that an unallocated award of $400 per week for alimony and child support be changed after three years to support payments of $300 per week. The defendant contends that there is no evidence to justify an allocation of $300 toward child support, since there was no inquiry into the individual needs of the children. He maintains that the plaintiff’s financial affidavit is insufficient since it contains only unallocated expenses and fails to specify what portion of the expenses relate to the children’s needs. He further claims that the subsequent child support order is inequitable because the plaintiff will receive a reduction in her taxes while the defendant’s tax burden will be increased. The plaintiff argues that the trial court did not abuse its discretion in ordering the payment, since it heard substantial testimony regarding the financial needs of the parties, observed the witnesses’ demeanor on the stand, and was able to evaluate all of the evidence. She further points out that the initial financial award was unallocated for tax reasons favorable to the defendant.
Trial courts have a distinct advantage over appellate courts in dealing with domestic relations because all of the surrounding circumstances as well as the appearance and attitude of the parties are observable by the court. deCossy v. deCossy, 172 Conn. 202, 204, 374 A.2d 182 (1977). The action of the trial court is not to be disturbed unless legal discretion is abused, and “ [i]n determining this the unquestioned rule is that “great weight is due to the action of the trial court and every reasonable presumption should be given in favor of its correctness.” Dudas v. Ward Baking Co., 104 Conn. 516, 518, 133 A. 591 [1926]; Roma v. Thames River Specialties Co., 90 Conn. 18, 20, 96 A. 169 [1915].’ ” *207Camp v. Booth, 160 Conn. 10, 13, 273 A.2d 714 (1970); Ardoline v. Keegan, 140 Conn. 552, 555, 102 A.2d 352 (1954).
There were many factors which were considered by the trial court in awarding child support, including the age of the children, the needs of the family, the financial affidavits of both parties, any anticipated increases in the income or change in circumstances of the parties, such as the probability that the plaintiff would be in a position to become gainfully employed after a three year period, the tax implications, and the appearance and attitude of the parties. The additional financial orders of the court were extensive and thorough and related to an escrow account balance from the sale of a jointly owned house, tax and other refund checks, life insurance policies, transfer of automobile ownership, and the defendant’s stock ownership and pension plan. It is apparent that the court had before it the financial affidavits of both parties, had heard arguments from counsel as to tax implications, and was in a position to observe the witnesses testify as to available resources and the needs of the plaintiff and the children.
In determining whether there has been an abuse of discretion, the ultimate issue is whether the court could reasonably conclude as it did. E. M. Loew’s Enterprises, Inc. v. Surabian, 146 Conn. 608, 611, 153 A.2d 463 (1959). “The amount of an award for the support of children incident to a divorce is a matter within the sound discretion of the trial court and will not be disturbed unless the discretion appears to have been abused.” Riccio v. Riccio, 153 Conn. 317, 319, 216 A.2d 431 (1966); see Shrager v. Shrager, 144 Conn. 483, 486, 134 A.2d 69 (1957). It is further recognized that an order for the support of minor children is not based solely on the needs of the children but takes into account what the parent can afford to pay. Fowler v. Fowler, 156 Conn. 569, 572, 244 A.2d 375 (1968). We *208find that, on the basis of all of the evidence and factors considered by it, the trial court could reasonably have reached its conclusions.
Ill
The third and final claim of the defendant is that the court erred in awarding custody of the parties’ two minor children to the plaintiff after both parties had agreed to joint custody. The defendant claims that even though the plaintiff may have appeared uncertain during the course of the trial as to whether or not she felt joint custody should be ordered, her concluding testimony was that she believed it in the best interests of the children that an award of joint custody be entered.2 He further asserts that the attorney for the minor children testified that she would recommend that joint custody be ordered if it could be achieved by agreement of the parties.3 The plaintiff calls our attention to testimony at the trial when, in answer to a question *209requesting that she explain why she would not be willing to have joint custody, she stated: “I don’t know, specifically the way we have been getting along. And we can’t get along. And, I think, the tension between us if we were to have joint custody at this point; we can’t communicate at all. And I just think it would be too difficult at this stage of the game.”
The ultimate decision as to joint custody rests with the trier of fact and must be based on all of the testimony and factors that are properly brought before the court, including the ability of the trier to observe the demeanor and manner in which the witnesses answer pertinent questions. In reaching a judgment with regard to custody, the trier must consider not only the final answer to a question but also the entire evidentiary fabric that has been established at the trial.
The trial court’s determination whether to award joint custody must take account of General Statutes § 46b-56a (b). That statute states: “There shall be a presumption, affecting the burden of proof, that joint custody is in the best interests of a minor child where the parents have agreed to an award of joint custody or so agree in open court at a hearing for the purpose of determining the custody of the minor child or children of the marriage. If the court declines to enter an order awarding joint custody pursuant to this subsection, the court shall state in its decision the reasons for denial of an award of joint custody.” This section does not mandate joint custody; it only creates a presumption that joint custody would be in the best interests of a minor child under certain circumstances. It is still for the trial court to decide whether joint custody has been agreed to by the parties. The statute at most requires the trial court to state in its decision any reasons for denial of an award of joint custody. It appears then that the sole question before us is whether or not the trial referee, in applying this statute, could reasonably have concluded as he did.
*210In the present case the trial court could reasonably have found that the parties did not agree to an award of joint custody. The record reflects some degree of uncertainty and vacillation by the plaintiff during her testimony concerning her desire for joint custody. At one point during her testimony the plaintiff stated that she believed joint custody would be proper. She later testified, however, that, because she and the defendant were having problems communicating, a joint custody award “would be too difficult at this stage of the game.” The trial court, after considering all of the evidence and the testimony of each of the witnesses in totality, could reasonably have concluded, as it did, that there really was no meeting of the minds and thus that a joint custody award was not in the best interests of the children.
“ ‘[Jjudicial review of a trial court’s exercise of its broad discretion is limited to the questions of whether the court correctly applied the law and could reasonably have concluded as it did. E.g., Smith v. Smith, 185 Conn. 491, 494, 441 A.2d 140 (1981); Basile v. Basile, 185 Conn. 141, 144, 440 A.2d 876 (1981); McGuinness v. McGuinness, 185 Conn. 7, 13, 440 A.2d 804 (1981).’ Beede v. Beede, 186 Conn. 191, 194-95, 440 A.2d 283 (1982).” Dubicki v. Dubicki, 186 Conn. 709, 713, 443 A.2d 1268 (1982). The weight given the evidence before it is within the sole province of the trial court. Beede v. Beede, supra, 195. It is the opinion of this court that the trial court could reasonably have concluded, under the circumstances of this case, that a joint custody award was neither agreed upon nor in the best interests of the minor children.
We find no error.
In this opinion the other judges concurred.
Although these conferences were not transcribed, the record indicates that the parties stipulated that at the several conferences occurring before and during trial suggestions for settlement were made to the parties by the trial referee.
The plaintiff testified on redirect examination as follows:
“Q. Mrs. Timm, in the course of this two day trial and all the evidence that has come before you, have you experienced any confusion about the custody issue in your own mind?
“A. Yes, I have, quite a lot.
“Q. What is your feeling today about the Court awarding joint custody to the parties?
“A. I still think it’s in the best interest of the children, that joint custody is best.
“Q. And so, would you be willing to leave it to the Court’s discretion if the Court feels that joint custody is in the best interest of the children, having heard all the evidence?
“A. Yes I would.
“Q. That it should be awarded?
“A. Yes it would.”
The attorney for the minor children testified as follows:
“Q. Your recommendation, I assume, would be for joint custody in this case, if it could be achieved by agreement of the parties?
“A. That’s correct.
“Q. And your recommendation to the Court, if the Court were able to award joint custody in this case, would be that such custody be awarded?
“A. Yes, I think it would be an appropriate order.”