optimize pcf packing