refactored sending and receiving from/to neighbor