implement chat protocol version 3