add threshold

add threshold