cluster distance + tests