Defendant appeals his indeterminate sentence to the Sex Offender Unit for an admitted offense of open lewdness, a sentence imposed notwithstanding the conclusion of the Adult Diagnostic and Treatment Center that his offense did not stem from a “repetitive-compulsive type *150of aberrant sexual behavior and thus he would not fall under the purview of the New Jersey Sex Offender Act.” Defendant contends that because of this conclusion and because the sentence was imposed after an appeal had been filed, the trial judge lacked power to impose the challenged sentence.
Defendant was charged in one indictment with assault with intent to rape (N. J. S. A. 2A:90-2) and lewdness (N. J. S. A. 2A:115-1). The charges were based on an incident which occurred on April 21, 1976 when defendant surreptitiously entered the girls’ locker room in the Rutgers University gymnasium and exposed his genitals to a woman then taking a shower. According to the victim, as she turned away defendant approached her from behind and placed his hand on her vagina. When defendant attempted to push her to the floor, she screamed and defendant ran from the scene.
Pursuant to plea bargain, defendant entered a plea of guilty to the lewdness count in exchange for which the State agreed to recommend dismissal of the assault charge. At the sentencing on August 15, 1977 the judge voiced his disagreement with the conclusion of the Diagnostic Center that defendant was not a repetitive-compulsive sex offender who did not come within the scope of the Sex Offender Act. Conceiving at the time that he therefore lacked power to commit defendant to the Sex Offender Unit for treatment but convinced that defendant’s offense in light of his prior history of sex related incidents on college campuses required institutionalization, he sentenced him to a two to three-year State Prison term with the specific recommendation that defendant be referred to the Sex Offender Unit for treatment.
A subsequent motion for a reduction of sentence based upon several favorable letters of reference and psychiatric evaluations was denied, the judge emphasizing the need for institutionalization as a deterrent and for the public safety.
Yet another motion for a change of sentence, this one filed after defendant took his appeal, was brought on the *151basis that defendant had been classified and incarcerated as a prisoner in the Rahway State Prison and was informed that he would not be afforded treatment in the Sex Offender Unit contrary to the Judge’s recommendation contained in the original sentence. In response to this information and despite misgivings, the judge committed defendant to an indeterminate term at the Sex Offender Unit because of his expressed disagreement with the conclusions of the Diagnostic Center and his belief that defendant was in need of psychiatric help. On this appeal defendant contends that the judge lacked power to impose this sentence because (1) the matter was then pending before the Appellate Division, and (2) commitment to the Sex Offender Unit is authorized only on the affirmative finding of the Diagnostic Center that a defendant is a compulsive and repetitive sex offender.
Despite our empathy with the intentions of the trial judge, we are nonetheless constrained to agree with defendant. At the time the challenged sentence was imposed, the case was pending before the Appellate Division and the trial judge lacked jurisdiction to make any modifications of the prior sentence in the absence of a remand for that purpose. See R. 2:9-1 (a); Sturdivant v. General Brass & Machine Corp., 115 N. J. Super. 224 (App. Div.), certif. den. 59 N. J. 363 (1971).
More significantly, however, the judge was without power to commit defendant to the Se^ Offender Unit without the finding of the Diagnostic Center that his offense was “characterized by a pattern of repetitive, 'Compulsive behaviour.” N. J. S. A. 2A:164-5. Upon such a finding, “it shall be the duty of the court, upon recommendation of the Diagnostic Center, to submit the offender to a program of specialized treatment for his mental and physical aberrations.” Id. Where, however, the Diagnostic Center concludes that defendant’s conduct cannot be so characterized, “the court shall impose sentence on such person in the manner provided by law.” N. J. S. A. 2A:164-9. Hence, whether a defendant will be committed for treatment as a sex offender *152for an indeterminate period or sentenced without regard to the Sex Offender Act depends upon the report of the clinical findings and recommendations of the Diagnostic Center. State v. Schreffler, 63 N. J. Super. 148, 152 (App. Div. 1960). State v. Newton, 30 N. J. Super. 382, 385-86 (App. Div. 1954), aff’d 17 N. J. 271 (1955). Where such findings affirm the absence of a compulsive and repetitive sexually aberrant component to a defendant’s conduct, that defendant cannot be viewed as a sex offender within the scope of the Sex Offender Act and must be sentenced without regard thereto.
In an effort to resist reinstatement of the original sentence imposed before the appeal and not in violation of the Sex Offender Act, defendant, through counsel and by his own letter brief, contends that the two to three-year State Prison term imposed was excessive. He argues that service of a custodial State Prison term would be inconsistent with the trial judge’s intentions to insure treatment and would impair the possibility of his rehabilitation. Instead, he suggests probation coupled with an obligation to submit himself for treatment at an outpatient mental health clinic, hence conceding the legitimacy of the trial judge’s concern for his mental health and the threat to the public’s safety should defendant’s proclivities go unchecked.
Clearly, the trial judge was faced with balancing defendant’s need for treatment against the need that future antisocial conduct be deterred in the interest of public safety. Treatment was not, under the statute, available in a custodial setting and defendant has apparently rejected the judge’s attempt to provide that treatment in violation of statute. We cannot disagree with the trial judge’s fears that defendant’s conduct, unchecked, may indeed pose a danger to the public and that a term of incarceration is required. In light of defendant’s history of sexually aberrant behavior, we reject his contention that the original sentence imposed was excessive and because of the illegality of the change therefrom, we reinstate it.
*153The challenged indeterminate commitment to the Sex Offender Unit is vacated and the original sentence, a two to three-year State Prison term is hereby reinstated.