add the grantVertexes function. Add additional logic to send DONE and ACK messages.