refactor
add streaming