first attempt at an mpi version