Made changes to adapt to the new parallel computation toolbox