
    The People of the State of New York, Respondent, v Raymond J. Massa, Appellant.
   — Appeal from a judgment of the County Court of Otsego County (Mogavero, Jr., J.), rendered October 13, 1982, convicting defendant upon his plea of guilty of the crime of attempted burglary in the second degree. In two separate indictments, defendant was charged with the crime of burglary in the second degree, burglary in the third degree, grand larceny in the third degree and petit larceny. Pursuant to a plea bargain, he entered a plea of guilty of the crime of attempted burglary in the second degree, a class D felony (Penal Law, §§ 140.25, 110.05, subd 5), in full satisfaction of all charges, was denied youthful offender status and received an indeterminate term of imprisonment with a maximum term of three years and a minimum term of one year. This appeal ensued. At the time of his plea, the court set forth the plea bargain as requiring that if it be found that defendant had an abnormal mental condition that could be treated and such treatment could take place in a facility where defendant would be required to remain, then he would be given a sentence of probation with the condition that he become a patient at such facility. The court noted that if such a facility could not be found, defendant would receive a sentence of one to three years’ imprisonment. Following defendant’s plea but prior to sentencing, defendant was released on the condition that he be admitted to the Benjamin Rush Psychiatric Center for treatment and that he remain at that facility until completion of the treatment. Thereafter, when defendant appeared for sentencing, it was learned that while at the psychiatric center he was allowed passes enabling him to leave the facility. The court determined that no secure facility as envisioned in the plea bargain was available to treat defendant and he was therefore sentenced to one to three years’ imprisonment. Initially, defendant argues that he should have been sentenced to probation pursuant to the plea bargain. The record is clear, however, that defendant, according to this bargain, was only to be put on probation if a secure facility where defendant would be required to remain was located. Since defendant was able to leave the Benjamin Rush Psychiatric Center upon obtaining a pass, this facility was not of the type contemplated in the plea bargain. When no secure facility could be found, the court properly sentenced defendant to a one- to three-year term of imprisonment pursuant to the plea bargain. Defendant, who was 19 years of age at the time of sentencing also urges that the court improperly denied him youthful offender status. The determination of whether or not to grant youthful offender status rests within the sound discretion of the court and depends upon all of the facts and circumstances of the case (People v Barlette, 83 AD2d 695, 696). Upon our review of the record, we find no abuse of discretion by the court in denying youthful offender status and, therefore, the court’s determination in this regard will not be disturbed. Nor can it be said upon the present record that there was an abuse of discretion in the imposition of sentence and, accordingly, the judgment must be affirmed (People v Hochberg, 62 AD2d 239). Judgment affirmed. Mahoney, P. J., Sweeney, Kane, Casey and Levine, JJ., concur.  