iterator for timeseries