sorting Objects by distance