updated time series script for new database upload