Multithreading added