error fixed (pr_thresh -> sd_thresh)