typo, also return gcd