added multithread things