adds header to stream