Added the getGCD method