substrCount, palindrome exercises