implemented sieve of eratosthenes