
    The People of the State of New York, Respondent, v Niles Palmer, Appellant.
   Mercure, J.

Appeal from a judgment of the County Court of Chenango County (Dowd, J.), rendered January 30, 1987, convicting defendant upon his plea of guilty of the crimes of attempted rape in the first degree, sodomy in the first degree and grand larceny in the second degree.

Defendant entered guilty pleas to the first, second and fifth counts of an indictment charging him, respectively, with attempted rape in the first degree, sodomy in the first degree and grand larceny in the second degree, upon condition that he be sentenced to a prison term of 12 Vi to 25 years or less, permitted to withdraw the pleas should a greater sentence be imposed, allowed to present witnesses at a presentence hearing and sentenced as a second felony offender rather than as a persistent felon. A presentence hearing was conducted, where defendant was permitted to testify and to present mitigation testimony by various witnesses. Thereafter, County Court sentenced defendant, as a predicate felon, to concurrent indeterminate prison terms of 12 Vi to 25 years on the conviction of sodomy in the first degree, 7 Vi to 15 years on the conviction of attempted rape in the first degree, and 3 Vi to 7 years on the conviction of grand larceny in the second degree.

On this appeal defendant challenges the validity of his sentence, contending that (1) County Court prejudged him and thereby denied him an unbiased and impartial sentence, (2) County Court’s examination of witnesses during the presentence hearing deprived him of a fair hearing, (3) County Court erred in not ordering, sua sponte, a psychological examination of defendant pursuant to CPL 730.30 (1) and (4) the sentence imposed was harsh and excessive.

In support of his allegation that County Court prejudged him, defendant has submitted a copy of a newspaper article specifically, relating to his case, published after defendant entered his plea of guilty but prior to the presentence hearing, in which County Court expressed the opinion that the way to deal with persistent felons is to "get them oif the streets as long as you can”. While we do not approve of County Court’s statement to the press prior to sentencing (see, People v Glendenning, 127 Misc 2d 880; Code of Judicial Conduct Canon- 3 [A] [6] [a Judge should abstain from public comment about a pending or impending proceeding]), by not raising this issue prior to sentencing defendant failed to preserve this argument for our review (see, People v Martin, 50 NY2d 1029). In any event, the actual sentence imposed was the one agreed to by defendant in his plea bargain, the terms of which were accepted by County Court over a month prior to the newspaper article in question. Moreover, the record does not indicate any abuse of discretion by County Court in accepting defendant’s plea (see, People v Bankowski, 134 AD2d 768), or bias or prejudice against defendant (see, People v Latella, 112 AD2d 324, lv denied 66 NY2d 616) which would have otherwise permitted the County Judge to recuse himself.

Next, we are not-persuaded that County Court’s examination of defendant’s witnesses during the presentence hearing deprived defendant of a fair proceeding. The very purpose of a presentence hearing is to permit the court to consider "any matter relevant to the sentence to be pronounced” (CPL 400.10 [1]). Defense counsel and the People were able to thoroughly examine the witnesses presented before County Court commenced its own examination (see, CPL 400.10 [2]), seeking to elicit an understanding of why defendant, who had an extensive criminal record and had already spent 25 years of his life in prison, should receive a lesser sentence than the one actually imposed.

Nor did we find error in County Court’s failure to order, sua sponte, a psychological examination of defendant prior to the imposition of sentence. Defendant was composed and expressed himself rationally and coherently during the proceedings, and there was no prior medical opinion as to his ability to participate in the proceedings or other evidence supportive "of the opinion that the defendant may be an incapacitated person” (CPL 730.30 [1]; see generally, People v Jones, 134 AD2d 701, lv denied 71 NY2d 969; People v McGarrity, 130 AD2d 793, lv denied 70 NY2d 714; People v Rios, 126 AD2d 860; cf., People v Arnold, 113 AD2d 101).

Contrary to defendant’s assertion, we find that the sentence imposed upon him was not harsh and excessive. Defendant was sentenced in accordance with his plea bargain and within statutory guidelines. "Having received the benefit of his bargain, defendant should be bound by its terms” (People v Felman, 141 AD2d 889, 890). Moreover, County Court’s imposition of the maximum sentence does not constitute an abuse of discretion given the nature of the crimes herein and defendant’s past criminal record (see, People v Latshaw, 123 AD2d 479, lv denied 69 NY2d 713). Additionally, defendant was permitted to plead to only 3 of the 5 counts of the indictment (see, People v Bankowski, supra, at 770) and to be sentenced as a second felony offender instead of a persistent felon (see, People v Preville, 117 AD2d 878, 879, lv denied 67 NY2d 949). Last, we reject defendant’s claim that County Court failed to consider rehabilitation (see, Penal Law § 1.05 [5]; People v Farrar, 52 NY2d 302; People v Burgh, 89 AD2d 672). Unlike the situation in People v Burgh (supra), the record convinces us that County Court considered rehabilitation but in its discretion rejected that factor as a basis for fixing the sentence in the circumstances of this case.

Judgment affirmed. Kane, J. P., Yesawich, Jr., Levine, Harvey and Mercure, JJ., concur.  