simplify header serialization