further exponentiation code