add stream support - fixes #3