reorder headers for optimization