rewrote protocol