Added more comments to interpolate_with_threshold