added gcd for int[] and handling no gcd found