algorithm can now be run parallel