Trying out different distance functions