add compare and udpate neighbor