Improvement add closest group analysis