Final change to multithreaded implementation