added choice of different metrics for distance definitions