add thread communication