started to implement Sieve of S - almost there, but still needs more work