public static Box pack(Collection<Box> pack) {
        LinkedList<Box> batch = new LinkedList<>(pack);

        Collections.sort(batch, (b1, b2) -> Double.compare(b2.v.maxDim(), b1.v.maxDim()));

        while (batch.size() > 1) {
            Box b1 = batch.poll();
            Box b2 = batch.peek();

            batch.addFirst(stackedCombo(batch, b1, b2));
        }

        return batch.peek();
    }