sort by distance now working!