added preliminary sorting method and figured out how to get distance of more than 25 locations