Explain gcd transformation process