private Fraction reduce()
   {
      Fraction result = new Fraction();
      int common = 0;
      // get absolute values for numerator and denominator
      int num = Math.abs(numerator);
      int den = Math.abs(denominator);
      // figure out which is less, numerator or denominator
      if (num > den)
         common = gcd(num, den);
      else if (num < den)
         common = gcd(den, num);
      else  // if both are the same, don't need to call gcd
         common = num;

      // set result based on common factor derived from gcd
      result.numerator = numerator / common;
      result.denominator = denominator / common;
      if (result.numerator < 0 && result.denominator < 0){
         result.numerator = -result.numerator;
         result.denominator = -result.denominator;
      } else if ( result.numerator >= 0 && result.denominator < 0){
         result.denominator =-result.denominator;
         result.numerator =-result.numerator;
      }
      return result;
   }