gcd algorithm added