updated trainingthreshcound = 50 from 20