exgcd updated. no recursion.