Solved challenge 9
Changed the function checking if a number is a prime for a better one.