improved threshold search based on interpolating between two point