refactoring to support better time series abstraction