Appeal from a judgment of the County Court of Rensselaer *700County (McGrath, J.), rendered October 28, 1994, upon a verdict convicting defendant of the crimes of sodomy in the first degree, sexual abuse in the first degree and endangering the welfare of a child.
Defendant was indicted on charges of sodomy in the first degree, sexual abuse in the first degree and endangering the welfare of a child. Following a jury trial, defendant was found guilty as charged and sentenced to concurrent prison terms of 8 Vs to 25 years on the sodomy conviction and 2 to 6 years on the sexual abuse conviction. He was also sentenced to a concurrent one-year jail term on the endangering the welfare of a child conviction. Defendant appeals.
Defendant contends that County Court erred in permitting the victim, age nine at the time of the trial, to testify under oath. Upon our review of the voir dire conducted by the court, it is apparent that the victim understood the concept and obligations of an oath, the difference between truth and falsity, and the consequences of giving false testimony (see, CPL 60.20 [2]). Accordingly, he was competent to give sworn testimony.
Defendant next contends that County Court should have redacted portions of his written confession to omit references to a 1992 act of sodomy on the victim as the same constituted evidence of a prior, uncharged crime which is inadmissible under the principles laid down in People v Ventimiglia (52 NY2d 350) and People v Molineux (168 NY 264). In his written statement to police, defendant admitted that he committed acts of sodomy on the victim during the summer of 1992 and the summer of 1993. Defendant, however, was only indicted on the sodomy committed during July 1993 (compare, People v Morin, 192 AD2d 791, lv denied 81 NY2d 1077).
County Court found that corrections made by defendant to his statement could have been the result of a mistake on his part as to the year of the charged crime. County Court concluded that whether the statement contained an admission to a separate 1992 act of sodomy, thereby constituting an uncharged crime, or whether it was a mistake by defendant as to the year of the charged crime was an issue of fact for the jury. This was error. The admissibility of a defendant’s prior criminal or immoral conduct poses a question of law for the trial court to determine after conducting a hearing satisfying the requirements of People v Ventimiglia (supra) (see, e.g., People v Hudy, 73 NY2d 40, 54-55). The references to a possible uncharged crime should have been the subject of a hearing to determine whether they should have been redacted.
Upon our review of the record, however, we conclude that *701the proof of guilt is overwhelming and there is no significant probability that defendant otherwise would have been acquitted had the ambiguous statements been redacted (see, People v Cook, 42 NY2d 204, 207; People v Gates, 234 AD2d 941, lv denied 89 NY2d 1011; People v Holloway, 185 AD2d 646, lv denied 80 NY2d 1027; cf., People v Lewis, 69 NY2d 321; People v Setless, 213 AD2d 900, lv denied 86 NY2d 740; People v Burke, 170 AD2d 1021, lv denied 77 NY2d 959; People v Richardson, 137 AD2d 105). This evidence consisted of the sworn testimony of the victim, who detailed the sexual acts perpetrated upon him by defendant at the latter’s apartment in early July 1993, and the victim’s younger brother, who corroborated that the victim and defendant were alone in defendant’s bedroom in early July 1993. Specifically, the brother testified that “[defendant] put me and [my other brother] out of the bedroom on the Nintendo, and took [the victim] in and wouldn’t let us in the bedroom”. There was also testimony from defendant’s former roommate to whom defendant admitted confessing “to the molestation of [the victim]” and stated that “he didn’t mean for it to happen, but that [the victim] was the first and only one and that he never had a child affect him that way”, as well as testimony from a police officer who overheard defendant state on the telephone shortly after giving his written statement to police that “I did it. There is no reason to lie about it.”
Finally, defendant argues that it was improper for County Court to engage in an ex parte communication with the Assistant District Attorney concerning alleged perjured testimony by the victim’s mother. Although improper (see, People v Williams, 162 AD2d 649, lv denied 76 NY2d 897; People v Paul, 140 AD2d 884), County Court thereafter met in chambers with the Assistant District Attorney, defendant and defense counsel to discuss defendant’s options in light of the possibly perjured testimony. Defendant did not object to the initial ex parte communication (see, People v Siegelson, 19 NY2d 889, amended 19 NY2d 1018, cert denied. 389 US 932), nor did the communication deny defendant a fair trial or the opportunity to be present at a material stage of the trial. The discussion between County Court and the Assistant District Attorney (cf., People v Ortega, 78 NY2d 1101, 1102) did not affect defendant’s opportunity to defend his case (see, e.g., People v Aguilera, 82 NY2d 23, 33; People v Morales, 80 NY2d 450, 456). Moreover, our review of the record discloses no prejudice to defendant as a result of the ex parte communication or County Court’s handling of the entire matter, as the court permitted defense counsel to reopen defendant’s case and reexamine the victim’s *702mother as a hostile witness. We are confident that the fairness and the integrity of the trial were not affected (see, People v Siegelson, supra), and, contrary to defendant’s contention, it was not necessary for County Court to sua sponte declare a mistrial.
We have reviewed defendant’s remaining contentions and find that they are either unpreserved for review or lacking in merit.
Cardona, P. J., Mercure and White, JJ., concur. Ordered that the judgment is affirmed.