added initial multithreading