added binary exponentiation