algorithm can now be run in parallel