moved primes to factor
moved prime from streams to here