finish gcd