modified class cutoff, fixed bug when Z-transforming