refactored the sieve example