fix of order

the ordering by distance was reverse. now it is in the right order