actuall set the header before returning