did some read/write methods in PacketIO