Added distance metric