changed the prime number helper