add support for working with streams