finished euclidean gcd