some improvements in streaming