adding chisq calculation in histogram