add multithreading to copy_domain