Implement find distances feature.