implementing data stream