completed sieve exercise
refactor sieve solution