added n_cores as variable, chi2 drawer