add solution for valid palindrome