move header to top, to keep recursion from affecting insertion