modifed PacketGenerator so that the number of config packets is reduced.