add exponentiation code