search threshold implementation