finished part a of rcv protocol