adds prime number checking and deletes all numbers not prime