respect units in generate_header