before multithread