small changes to stream and header sections