functions to test wheter a number is a prime