updated arima function