added some flags to sieve
renamed sieve to prime
wrapping outter func