update runModel.r, now fully runnable