slightly faster exponentiation