added Stream support