refactor
refactor Stream
refactor Stream
refactor
add test