Working: work on mpi version