updtae code for communication