added gcd for long
tested long gcd