add greatest common divisor