added the distance function in a txt file