add miller rabin base class