rough pass at using naive primality test