fixed gcd, while loops