add average method and calculate MAE and RMSE