
    Jerome S. Papernik, Respondent, v Rebecca Papernik, Appellant.
   Order unanimously reversed, without costs, and matter remitted to Erie County Family Court for further proceedings in accordance with the following memorandum: In this custody proceeding Family Court found both parents fit but awarded custody of their daughter (now three and one-half years old) to the father because he was more "stable”. The court based its decision on the fact that after the marriage had broken up and the parties separated, appellant took the child with her to Georgia and Florida for a few days while she visited with a former boy friend and also on the fact that at the time of trial appellant was pregnant and living with her boy friend, although her marriage with respondent had not been dissolved. At the time of the hearing and for several months before the hearing, the child was with the father. Neither parent in a custody case has a prima facie right to custody (Domestic Relations Law, §§ 70, 240). Custody must be awarded solely upon a finding of what is in the best interests of the child. When the parties have agreed that custody should be in one parent (as they had agreed to the mother’s custody in this case), that custody should not be upset without a finding that the custodian is unfit or at least less fit than the other parent (Nierenberg v Nierenberg, 43 AD2d 717; see, also, Mantell v Mantell, 45 AD2d 918). By all accounts, both the mother and father were loving and considerate parents of the child until they separated and both continued to be fit parents thereafter. The mother took the child with her when she left respondent and she retained custody by his acquiescence and later by his signed separation agreement. The agreement was consummated after appellant took the child to Florida to visit her boy friend and after they returned to Buffalo together, and there is no evidence in this record to indicate that the child was exposed during this relatively brief period to immoral conduct by the mother which the child saw or could appreciate or by which she was adversely affected (see Matter of Feldman v Feldman, 45 AD2d 320; Matter of Rodolfo CC v Susan CC, 37 AD2d 657). Respondent knew of the trip and of appellant’s relationship with the boy friend when he agreed that custody be given to the mother in exchange for conveyance of her interest in the parties’ jointly owned property, and there was no change of circumstances in the one-day interval between the execution of the agreement and the temporary ex parte order transferring custody to respondent which would warrant a change in custody. Under the circumstances presented, this one episode does not require that the mother be deprived of the agreed upon custody of her young daughter so long as the trial court can be satisfied that the mother is in a position to provide a suitable home for the infant in the future. We feel obliged to comment upon the manner in which this proceeding was conducted. First, we find no basis for the ex parte order changing custody of the child one day after the father had consummated an agreement awarding custody to the mother. Temporary ex parte orders of this kind are to be issued only upon the clearest showing that a change is required for protection of the child. If the court knew of the separation agreement, its temporary ex parte order of custody was clearly an improvident exercise of its powers. If it did not know of the agreement and felt obliged to make a peremptory change in custody, its order should have been returnable promptly, not two weeks later. Furthermore, the timing and manner in which respondent secured appellant’s execution of the separation agreement raises a serious question of the conduct of his counsel and of respondent’s fitness to be custodian of the child. While secreting their daughter, respondent secured the mother’s consent to the agreement by which she was awarded custody of the child in exchange for her conveyance of the parties’ jointly owned property (in which she had a substantial personal investment). The next day respondent obtained a temporary ex parte order transferring custody of the child to himself. Much of the evidence in this trial consisted of disputed accusations and conclusory statements concerning past indiscretions of the parties before or during their marriage. It undoubtedly had its effect upon the court but it had little to do with parental fitness since the child was healthy and happy and both parents had been loving parents throughout her life. We reiterate the well-recognized rule that in a custody proceeding the court is not adjudicating a controversy between adversary parties (Finlay v Finlay, 240 NY 429, 434) but is attempting to determine how the best interests of the child may best be satisfied. We also note that the court permitted an unrepresented 20-year-old witness to incriminate himself by extensive testimony of his drug use and sales, matters entirely collateral to the issues in this proceeding, without an effort to inform him of his constitutional right to remain silent. Finally, we express our strong disapproval of the informal and undignified manner in which this proceeding was conducted by both the court and counsel. The proceeding is remitted to Erie County Family Court for further proceedings before a different Judge and custody is awarded to appellant pending a final disposition of the issues raised herein. (Appeal from order of Erie County Family Court—custody.) Present—Moule, J. P., Simons, Dillon, Goldman and Witmer, JJ.  