added support for stream redirect functionality