gcd no temp
added answer 5