one-pass shrinking almost working, test errors corrected