add better stream support