add better version of the palindromes without copying substr