Implemented Multithreading