Add parameter to set standard deviation threshold