added model.R for arima modelling