changed threshold parameters