few changes to the stream interface