bug with variance indices passing for chisq calc
Automatic style corrections courtesy of autopep8