rename in euclid algorithm