extract samplecountthreshold to config level
Merge remote-tracking branch 'origin/master'