improvements to sumstats_to_chisq