added pdist