implement Stream to wrap the data flow
include some Stream tests
add more tests