some stream functions