GCD functions tested and working