Fix bug in chi2 and add introduction