Added Nmax to the computation in parallel stuff