removed used of random and used a shuffle algorithm on the prime list