add fcn for data stream