Added calculation and output of chi^2