improved tests and docs, stream support is better