example script and v1 of time series retrieval function