message sending and receiving implemented