Change Miller-Rabin Algorithm