add gcd method