modular exponentiation added