implemented sender and receiver for task3