change multiprocess to multithread