initial version of checking if number is prime