added better implementation of 3 with miller rubin but its still so freaking slow