optimized, added MPI