Added sort by distance.