Sends and recieves messages correctly