Add setting for minimum distance