Create palindrome function. Loops properly but doesn't return correct answer.