Added MPI calls for parallel run