bug fixed and threshold update. #2