echo protocol implementation