improved modular exponentiation algorithm
improved modular exponentiation algorithm