primary threshold script