add primality test for small numbers