modified rMVNArma.cpp