crude custom distance method added