removed MPI_Barrier for parallel computing part. Only use MPI_Barrier when blocking cout clause, not the actual computing part!!!