use streaming for the CLI
minor tweaks
add test for #2
0.3.0