parallel calculations 4 threads