is_power function working and gcd needs work but I got stuck