add a prime number based approach