optimize the space of headers