made a function that creates an array of primes below a given value