simplify preparePacket