adding code for sender and receiver