added comments to stream.c