refactoring time series helper
testing time series helper