extracted time series builder to its own class