added new sticky header algorithm