added a gcd and lcm functions