chi2 method is now vectorized