In habeas petitions seeking to overturn orders finding defendants to be "sex offenders requiring civil management" and be held in custody past their scheduled release dates, the appellate division's reversal of the trial court's denial of the petitions is reversed where Article 10 of the Mental Hygiene Law, which provided that certain imprisoned sex offenders may be transferred to mental hospitals, rather than being released when their prison terms expired, applied to offenders actually imprisoned, even if the procedure that led to their imprisonment was flawed.