How to solve packing problems