change the way to check palindrome, and add count words from file