Implemented tasks 2 and 5, MPI