added n-variable test with chi-squared