parallelized the code, output prints out wierd (just a warning) due to the parallelization