simplified and documented samples/stream.