added support for querying against stream