starting to work on chisq