implement T inside timeseries function