finish palindrome detector