add exit checking for sender