updated thread_num for xdet