improved multithreading, version 0.8.1