implementing TimeSeries lib