added param precomputed_threshold