New Function
Change the interface: add the compactness parameter