fix quadratic threshold