move code from protocol to peer
fix conflict resolution for BGP