code cleaning sender and receiver