cleanup
initial support for streaming API