finding the GCF recursively