Implemented multithreading.
.
Implemented multithreading