updated to require TimeSeries