returns true for prime numbers and false for non primes