working chi-squared scoring