added support for stdin streaming