Check_distance working