Using a dictionary for distances
Select distance function from command lin