use better sieve and add test