optimize population and header adjust