optimizations for packing et cetera