Use of distance in getBestTarget