added logging
protocol#encodePacket works now