added way to check if a number is prime