stuff for managing time series