changed to run with 4 threads, experiment shows that runs about 17% faster