Working on gcd function