removed auto reference in stats.cpp.  changed default threads to 16 and added a threads parameter