repleaced miller rabin test with feramt test