gcd algorithm

please review and merge if it's ok :)
this is ok I guess :+1: