http://nachbaur.com/blog/using-gcd-and-blocks-effectively