added csvwriter and stats to param_regress
added csvwriter to numberhist