adaptive header search