developed brute force method to sieve all prime numbers