add chi2 method (still incomplete)