fixing a bug, and adding methods to help find the GCF