updated code to allow a prime number to be compaired with itself