Problem 7 and Fixed CheckPrime