implement the modular exponentiation