modify longest palindromic substring