fix rubocop errors for palindrome