Added buildPacket