the sieve method