fixed 'primes' so it outputs the right number of prime numbers