adapted code for time series LARS