fixed euclidiandistance