need to implement greatest common denominator.