Added primality test