fix euclidean version