Revert "Revert "possibly correct multithreaded calculations""
This reverts commit de341470f67fe69276177b2096e894b0a3f3791f.