added to loops but couldn't do isPrime alone