added sending and receiving parts