now with sample size minimization