was using the sieve inefficiently, fixed