fixed chi-squared tests to not be as dependent on fit() function