item sorting based on distance fixed