modified func ...read_distances, deletion of comp sign