bug fix in get_locations_within_distance_range function: the previous logic for generating all possible locations was wrong. Added ut.