updated gcd