added a function to investigate packing density