finish the header