getting to gcd