Added code for computing farthest points.