change distance measure