GCD  From http://blog.devtang.com/blog/2012/02/22/use-gcd/