Adds multithreading