added MPI code