my algorithm packing