Add receive function and printout the received data