fixed sorted by distance