finished prime palindrome exercise